#include "modbuscontrol.h"
#include <qvariant.h>


ModbusControl* ModbusControl::m_instance = nullptr;
QMutex ModbusControl::m_mutex;

ModbusControl::ModbusControl(QObject *parent)
    : QObject{parent}
{
    m_Modbus = new QModbusRtuSerialClient(this);
    pollTimer = new QTimer(this);
    pollTimer->setInterval(500);
    // pollTimer->start();
    QObject::connect(pollTimer,&QTimer::timeout,this,&ModbusControl::read_PLC_Parameters_Slots);
    // 初始化报警信号
    initWarningSignal();
    QObject::connect(m_Modbus,&QModbusDevice::stateChanged,this,[=]{
        if(m_Modbus->state() == QModbusDevice::ConnectedState)
        {
            // setPLC_CurrentState(1);
            pollTimer->start();
        }
        else if(m_Modbus->state() == QModbusDevice::UnconnectedState)
        {
            // setPLC_CurrentState(2);
            // m_Modbus->connectDevice();
        }
        else if(m_Modbus->state() == QModbusDevice::ConnectingState)
        {
            // setPLC_CurrentState(3);
        }
    });


}

ModbusControl::~ModbusControl()
{
    // delete m_Modbus;
    m_Modbus->deleteLater();
}

ModbusControl *ModbusControl::getInstance(QObject *parent)
{
    if(!m_instance)
    {
        QMutexLocker locker(&m_mutex);
        if(!m_instance)
        {
            m_instance = new ModbusControl(parent);
        }
    }

    return m_instance;
}

void ModbusControl::setModbusConnectParameter(QString serialPort,
                                              QString baudRate,
                                              QString dataBit,
                                              QString parityBit,
                                              QString stopBit)
{
    QSerialPort::BaudRate set_BaudRate;
    QSerialPort::DataBits set_DataBit;
    QSerialPort::Parity   set_ParityBit;
    QSerialPort::StopBits set_StopBit;

    // 设置 - 波特率
    if("115200" == baudRate){
        set_BaudRate = QSerialPort::Baud115200;
    }else if("57600" == baudRate){
        set_BaudRate = QSerialPort::Baud57600;
    }else if("38400" == baudRate){
        set_BaudRate = QSerialPort::Baud38400;
    }else if("19200" == baudRate){
        set_BaudRate = QSerialPort::Baud19200;
    }else if("9600" == baudRate){
        set_BaudRate = QSerialPort::Baud9600;
    }else if("4800" == baudRate){
        set_BaudRate = QSerialPort::Baud4800;
    }else if("2400" == baudRate){
        set_BaudRate = QSerialPort::Baud2400;
    }else {
        set_BaudRate = QSerialPort::Baud1200;
    }

    // 设置 - 数据位
    if("8" == dataBit){
        set_DataBit = QSerialPort::Data8;
    }else if("7" == dataBit){
        set_DataBit = QSerialPort::Data7;
    }else if("6" == dataBit){
        set_DataBit = QSerialPort::Data6;
    }else {
        set_DataBit = QSerialPort::Data5;
    }

    // 设置 - 校验位
    if("None" == parityBit){
        set_ParityBit = QSerialPort::NoParity;
    }else if("Even" == parityBit){
        set_ParityBit = QSerialPort::EvenParity;
    }else if("Odd" == parityBit){
        set_ParityBit = QSerialPort::OddParity;
    }else if("Mark" == parityBit){
        set_ParityBit = QSerialPort::MarkParity;
    }else {
        set_ParityBit = QSerialPort::SpaceParity;
    }

    // 设置 - 停止位
    if("1" == stopBit){
        set_StopBit = QSerialPort::OneStop;
    }else if("1.5" == stopBit){
        set_StopBit = QSerialPort::OneAndHalfStop;
    }else{
        set_StopBit = QSerialPort::TwoStop;
    }

    m_Modbus->setConnectionParameter(QModbusDevice::SerialPortNameParameter,serialPort);
    m_Modbus->setConnectionParameter(QModbusDevice::SerialBaudRateParameter,set_BaudRate);
    m_Modbus->setConnectionParameter(QModbusDevice::SerialDataBitsParameter,set_DataBit);
    m_Modbus->setConnectionParameter(QModbusDevice::SerialParityParameter,set_ParityBit);
    m_Modbus->setConnectionParameter(QModbusDevice::SerialStopBitsParameter,set_StopBit);
}

void ModbusControl::connectToDevice()
{

    m_Modbus->connectDevice();

}

void ModbusControl::floatResolution(QString setValue, uint16_t *heightValue, uint16_t *lowValue)
{
    float floatValue = setValue.toFloat();

    // qDebug()<<"当前需要转换的数据为:  "<<test;

    uint8_t midValue [4] = {0};

    memcpy(midValue,&floatValue,sizeof(float));   // 可用

    uint16_t transResult[2] = {0};

    // qDebug()<<"8-高位: " <<midValue[3];
    // qDebug()<<"8-低位: " <<midValue[2];
    // qDebug()<<"8-次低位: " <<midValue[1];
    // qDebug()<<"8-低位: " <<midValue[0];

    transResult[0] = (midValue[3] << 8| midValue[2]);
    transResult[1] = (midValue[1] << 8| midValue[0]);

    // qDebug()<<"16-高位"<<midValue01[0];
    // qDebug()<<"16-低位"<<midValue01[1];

    *heightValue = transResult[0];
    *lowValue = transResult[1];
}

float ModbusControl::combinationToFloat(quint16 heightValue, quint16 lowValue)
{
    float result = 0;

    uint32_t midValue = (static_cast<uint32_t>(heightValue) << 16) | static_cast<uint32_t>(lowValue);

    result = *(float*)&midValue;

    return result;
}

int ModbusControl::combinationToInt(quint16 heightValue, quint16 lowValue)
{
    int result = 0;

    uint32_t midValue = (static_cast<uint32_t>(heightValue) << 16) | static_cast<uint32_t>(lowValue);

    result = *(int*)&midValue;

    return result;
}

void ModbusControl::write_Modbus_RTU_Coils(int address, QString newValue)
{

    uint16_t value = newValue.toUShort();

    QModbusDataUnit writeUnit(QModbusDataUnit::Coils,address,1);

    writeUnit.setValue(0,value);

    // 发送写请求
    if (QModbusReply* reply = m_Modbus->sendWriteRequest(writeUnit, 1))
    {
        if (!reply->isFinished())
        {
            QObject::connect(reply, &QModbusReply::finished, [reply, address, value]()
                             {
                                 if (reply->error() != QModbusDevice::NoError)
                                 {
                                     qDebug() << "写入 线圈 失败:" << reply->error();
                                 } else
                                 {
                                     qDebug() << "写入 线圈 成功" <<"  地址: "<<address<<" 写入值: "<<value;
                                 }
                                 reply->deleteLater();
                             });
        } else {
            reply->deleteLater();
        }
    } else {
        qDebug() << "发送 写入线圈 请求失败";
    }
}

void ModbusControl::write_Modbus_RTU_Hold_32(int address, QString newValue)
{    
    uint16_t write_regs[2] = {0};

    // 高位在前  低位在后
    floatResolution(newValue,&write_regs[1],&write_regs[0]);

    //写入到 holdaddress 地址    写两个寄存器
    QModbusDataUnit writeUnit(QModbusDataUnit::HoldingRegisters, address, 2);

    // 写入数据体设置
    for (int i = 0; i < writeUnit.valueCount(); ++i) {
        writeUnit.setValue(i, write_regs[i]);
    }

    // 发送写请求
    if (QModbusReply* reply = m_Modbus->sendWriteRequest(writeUnit, 1))
    { // 1为从站地址
        if (!reply->isFinished())
        {
            QObject::connect(reply, &QModbusReply::finished, [reply, address, newValue]()
                             {
                                 if (reply->error() != QModbusDevice::NoError)
                                 {
                                     qDebug() << "写入 保持寄存器32 失败:" <<"  地址 : "<<address<<"  写入值: "<<newValue<<"  "<< reply->error();
                                 } else
                                 {
                                     qDebug() << "写入 保持寄存器32 成功"<<"  地址 : "<<address<<"  写入值: "<<newValue;
                                 }
                                 reply->deleteLater();
                             });
        } else {
            reply->deleteLater();
        }
    } else {
        qDebug() << "发送 写入保持寄存器32 请求失败" <<"  地址 : "<<address<<"  写入值: "<<newValue;
    }
}

void ModbusControl::write_Modbus_RTU_Hold_16(int address, QString newValue)
{
    quint16 value = newValue.toInt();

    //写入到 holdaddress 地址
    QModbusDataUnit writeUnit(QModbusDataUnit::HoldingRegisters, address, 1);

    writeUnit.setValue(0,value);

    // 发送写请求
    if (QModbusReply* reply = m_Modbus->sendWriteRequest(writeUnit, 1))
    { // 1为从站地址
        if (!reply->isFinished())
        {
            QObject::connect(reply, &QModbusReply::finished, [reply, address, newValue]()
                             {
                                 if (reply->error() != QModbusDevice::NoError)
                                 {
                                     qDebug() << "写入 保持寄存器16 失败:" <<"  地址 : "<<address<<"  写入值: "<<newValue<<"  "<< reply->error();
                                 } else
                                 {
                                     qDebug() << "写入 保持寄存器16 成功"<<"  地址 : "<<address<<"  写入值: "<<newValue;
                                 }
                                 reply->deleteLater();
                             });
        } else {
            reply->deleteLater();
        }
    } else {
        qDebug() << "发送 写入保持寄存器16 请求失败" <<"  地址 : "<<address<<"  写入值: "<<newValue;
    }
}

void ModbusControl::read_PLC_Time(QDateTime savedTime)
{
    QModbusDataUnit readUnit(QModbusDataUnit::HoldingRegisters,8013,6);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this ,savedTime]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();                                                        

                            currentTime.setHMS(resultUnit.value(2),resultUnit.value(1),resultUnit.value(0));
                            currentDate.setDate(2000+resultUnit.value(5),resultUnit.value(4),resultUnit.value(3));

                            // qDebug()<<"年:"<<resultUnit.value(5);
                            // qDebug()<<"月:"<<resultUnit.value(4);
                            // qDebug()<<"日:"<<resultUnit.value(3);
                            // qDebug()<<"时:"<<resultUnit.value(2);
                            // qDebug()<<"分:"<<resultUnit.value(1);
                            // qDebug()<<"秒:"<<resultUnit.value(0);

                            currentDateTime_PLC.setDate(currentDate);
                            currentDateTime_PLC.setTime(currentTime);

                            qDebug()<<"配置保存的时间:"<<savedTime.toString("yyyy-MM-dd HH:mm:ss");
                            qDebug()<<"当前PLC的时间:"<<currentDateTime_PLC.toString("yyyy-MM-dd HH:mm:ss");

                            if(savedTime.date() <= currentDateTime_PLC.date())
                            {
                                // qDebug()<<"锁机触发!!!!";
                                setLockMechine_Flag(true);
                                // pollTimer->stop();
                            }
                            else
                            {
                                setLockMechine_Flag(false);
                                // pollTimer->stop();
                            }

                            qDebug()<<"锁机是否触发:"<<LockMechine_Flag();

                        }
                    });
        }
    }



}

void ModbusControl::read_Warning_And_Hint_Data()
{

    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setWarning_Jerk(resultUnit.value(2));
                            setWarning_Servo(resultUnit.value(3));
                            setWarning_Front_Soft_Limit_Over(resultUnit.value(31));
                            setWarning_Back_Soft_Limit_Over(resultUnit.value(36));

                            setM_42(resultUnit.value(42));
                            setM_43(resultUnit.value(43));
                            setM_47(resultUnit.value(47));
                            setM_52(resultUnit.value(52));
                            setM_56(resultUnit.value(56));
                            setM_57(resultUnit.value(57));
                            setM_58(resultUnit.value(58));
                            setM_59(resultUnit.value(59));
                            setM_64(resultUnit.value(64));
                            setM_68(resultUnit.value(68));
                            setM_69(resultUnit.value(69));
                            setM_73(resultUnit.value(73));
                            setM_76(resultUnit.value(76));
                            setM_77(resultUnit.value(77));
                            setM_80(resultUnit.value(80));
                            setM_134(resultUnit.value(134));
                            setM_137(resultUnit.value(137));
                            setM_143(resultUnit.value(143));
                            setM_149(resultUnit.value(149));
                            setM_152(resultUnit.value(152));
                            setM_153(resultUnit.value(153));
                            setM_159(resultUnit.value(159));
                            setM_164(resultUnit.value(164));
                            setM_170(resultUnit.value(170));
                            setM_196(resultUnit.value(196));
                            setM_197(resultUnit.value(197));

                            setSawsStartState(resultUnit.value(240));

                            setM_250(resultUnit.value(250));
                            setM_251(resultUnit.value(251));
                            setM_252(resultUnit.value(252));

                            setM_528(resultUnit.value(528));
                            setM_510(resultUnit.value(510));
                            setPowerOffMode(resultUnit.value(509));
                            setM_400(resultUnit.value(400));
                            setM_398(resultUnit.value(398));
                            setM_397(resultUnit.value(397));
                            setAutoObserveState(resultUnit.value(396));
                            setMechineChangeAngleMode(resultUnit.value(394));
                            setM_500(resultUnit.value(500));
                            setM_501(resultUnit.value(501));
                            setServoType(resultUnit.value(392));
                            setM_393(resultUnit.value(393));
                            setM_502(resultUnit.value(502));
                            setM_503(resultUnit.value(503));
                            setM_399(resultUnit.value(399));
                            setM_529(resultUnit.value(529));
                            setM_530(resultUnit.value(530));
                            setM_511(resultUnit.value(511));
                            setM_505(resultUnit.value(505));
                            setM_506(resultUnit.value(506));
                            setM_507(resultUnit.value(507));

                            if(M_511())
                            {
                                if(resultUnit.value(135) == true)
                                {
                                    // // qDebug()<<"自动打印中继触发!!";
                                    // if(MechineChangeAngleMode())
                                    // {
                                    //     emit printer_Active_Sig(LeftAngleFeedBack(),RightAngleFeedBack(),Wait_Worked_MaterialLength(),"");
                                    // }
                                    // else
                                    // {
                                    //     emit printer_Active_Sig(LeftAngleFeedBack(),RightAngleFeedBack(),Wait_Worked_MaterialLength(),MaterialHeightValue());
                                    // }

                                    AutoPrinterFunction();



                                    write_Modbus_RTU_Coils(135,"0");

                                }
                                else
                                {
                                    // qDebug()<<"自动打印中继无效!!";
                                }
                            }
                            else
                            {
                                return;
                            }



                        }
                        else
                        {
                            qDebug()<<"读取 报警 提示 信息 配置信息 失败"<<reply->errorString();
                        }

                        reply->deleteLater();
                    });
        }
    }

}

void ModbusControl::initWarningSignal()
{
    for(int i = 0 ; i < 4 ; ++i)
    {
        m_warnVector.append(false);
        m_newWarnVector.append(false);
    }

    m_warnDetail.insert(0,tr("急停有效!!!"));
    m_warnDetail.insert(1,tr("伺服报警!!!"));
    m_warnDetail.insert(2,tr("正向超程!!!"));
    m_warnDetail.insert(3,tr("反向超程!!!"));


}

void ModbusControl::getWarningSingnal()
{
    for(int i = 0 ; i < m_warnVector.size(); ++i )
    {
        switch(i)
        {
        case 0:
            m_newWarnVector[i] = Warning_Jerk();
            break;
        case 1:
            m_newWarnVector[i] = Warning_Servo();
            break;
        case 2:
            m_newWarnVector[i] = Warning_Front_Soft_Limit_Over();
            break;
        case 3:
            m_newWarnVector[i] = Warning_Back_Soft_Limit_Over();
            break;
        default:
            break;
        }
    }

    saveWarningSignal();
}

void ModbusControl::saveWarningSignal()
{
    for(int i = 0 ; i < m_warnVector.size(); ++i)
    {
        m_warnVector[i] = m_newWarnVector[i];
    }

    sendWarningSingalToQML();

}

void ModbusControl::getWarningDetailInfo(int index)
{
    if(m_warnVector[index] == true)
    {
        m_warnInfo = m_warnInfo + m_warnDetail[index];
    }
}

void ModbusControl::sendWarningSingalToQML()
{
    m_warnInfo = tr("当前报警:");

    for(int i = 0 ; i < m_warnVector.size(); ++i)
    {
        switch(i)
        {
        case 0:
            getWarningDetailInfo(i);
            break;
        case 1:
            getWarningDetailInfo(i);
            break;
        case 2:
            getWarningDetailInfo(i);
            break;
        case 3:
            getWarningDetailInfo(i);
            break;
        default:
            break;
        }
    }

    emit warning_Signal_Changed_Sig(m_warnInfo);

}

void ModbusControl::read_CuurentLocationValue()
{    

    int Addr1 = 196;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setCurrentLocationValue(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0)),0,'f',2));
                            // qDebug()<<"当前位置:"<<CurrentLocationValue();
                            setMaterialHeightValue(QString("%1").arg(combinationToFloat(resultUnit.value(19),resultUnit.value(18)),0,'f',2));
                            // qDebug()<<""
                        }
                        else
                        {
                            qDebug()<<"读取 双字寄存器 失败"<<reply->errorString();
                        }

                        reply->deleteLater();
                    });
        }
    }


    int Addr2 = 1562;

    QModbusDataUnit readUnit2(QModbusDataUnit::HoldingRegisters,Addr2,1);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            // setCurrentLocationValue(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0)),0,'f',2));
                            // // qDebug()<<"当前位置:"<<CurrentLocationValue();
                            setDoubleSaws_StartDelay(QString("%1").arg(resultUnit.value(0)));
                            // qDebug()<<"双锯片延时:"<<DoubleSaws_StartDelay();
                        }
                        else
                        {
                            qDebug()<<"读取 双锯片延时 失败"<<reply->errorString();
                        }

                        reply->deleteLater();
                    });
        }
    }


}

void ModbusControl::read_ManualProcessWindow_Hold()
{
    int Addr1 = 50;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,100);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            // 106 107
                            setWait_Worked_MaterialLength(QString("%1").arg(combinationToFloat(resultUnit.value(15),resultUnit.value(14))));
                            setMaterialHeightObservedValue(QString("%1").arg(combinationToInt(resultUnit.value(57),resultUnit.value(56))));
                            // qDebug()<<"代加工料长"<<Wait_Worked_MaterialLength();
                            // qDebug()<<"料高测量值:"<<MaterialHeightObservedValue();
                        }
                        else
                        {
                            qDebug()<<"读取 双字寄存器 失败"<<reply->errorString();
                        }

                        reply->deleteLater();
                    });
        }
    }

    int Addr2 = 200;

    QModbusDataUnit readUnit2(QModbusDataUnit::HoldingRegisters,Addr2,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setOriginValue(QString("%1").arg(combinationToFloat(resultUnit.value(11),resultUnit.value(10)),0,'f',2));
                            // qDebug()<<"原点值:"<<OriginValue();
                            setMaterialLengthValue(QString("%1").arg(combinationToFloat(resultUnit.value(13),resultUnit.value(12)),0,'f',2));
                            // qDebug()<<"手动料长值:"<<MaterialLengthValue();
                            setMaterialHeightValue(QString("%1").arg(combinationToFloat(resultUnit.value(15),resultUnit.value(14)),0,'f',2));
                            // qDebug()<<"手动料高值:"<<MaterialHeightValue();
                            setMaxCutLength(QString("%1").arg(combinationToFloat(resultUnit.value(17),resultUnit.value(16)),0,'f',2));
                            // qDebug()<<"最大切割长度:"<<MaxCutLength();
                            setSawsMode(QString("%1").arg(resultUnit.value(29)));
                            // qDebug()<<"旋钮位置:"<<SawsMode();
                            setCutSegments(QString("%1").arg(resultUnit.value(30)));
                            // qDebug()<<"手动加工段数:"<<CutSegments();
                            setCurrentSegments(QString("%1").arg(resultUnit.value(31)));
                            // qDebug()<<"当前加工段数值:"<<CurrentSegments();

                        }
                    });
        }
    }

    int Addr3 = 1390;

    QModbusDataUnit readUnit3(QModbusDataUnit::HoldingRegisters,Addr3,10);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit3,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setAngle45SafeDistance(QString("%1").arg(combinationToFloat(resultUnit.value(5),resultUnit.value(4)),0,'f',2));
                            // qDebug()<<"45度内摆安全距离:"<<Angle45SafeDistance();

                        }
                    });
        }
    }
}

void ModbusControl::read_ManualProcessWindow_Coils()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setObservingState(resultUnit.value(109));
                            // qDebug()<<"料高测量中:"<<ObservingState();
                            setImpactState(resultUnit.value(239));
                            // qDebug()<<"压紧状态:"<<ImpactState();
                            setSawsStartState(resultUnit.value(240));
                            // qDebug()<<"锯片启动状态:"<<SawsStartState();
                            setSawsOutState(resultUnit.value(241));
                            // qDebug()<<"锯片工进状态:"<<SawsOutState();
                            setMechineChangeAngleMode(resultUnit.value(394));
                            // qDebug()<<"内摆外摆:"<<MechineChangeAngleMode();
                            setAutoObserveState(resultUnit.value(396));
                            // qDebug()<<"自动测料高功能:"<<AutoObserveState();
                            setLeftAngleFeedBack(resultUnit.value(390));
                            // qDebug()<<"左角度反馈值M390"<<LeftAngleFeedBack();
                            setRightAngleFeedBack(resultUnit.value(391));
                            // qDebug()<<"右角度反馈值M391"<<RightAngleFeedBack();


                        }
                    });
        }
    }
}

void ModbusControl::read_ManualProcessWindow_DiscreteInputs()
{
    int addr1 = 13312;

    QModbusDataUnit readUnit1(QModbusDataUnit::DiscreteInputs,addr1,30);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();
                            setIO_X12(resultUnit.value(10));  // X12
                            setIO_X13(resultUnit.value(11)); // X13
                            setIO_X14(resultUnit.value(12));  // X14
                            setIO_X15(resultUnit.value(13)); // X15

                            // qDebug()<<"X12"<<IO_X12();
                            // qDebug()<<"X13"<<IO_X13();
                            // qDebug()<<"X14"<<IO_X14();
                            // qDebug()<<"X15"<<IO_X15();
                        }
                        else
                        {
                            qDebug()<<"读取 X12 X13 X14 X15"<<reply->errorString();
                        }

                        reply->deleteLater();
                    });
        }
    }
}

void ModbusControl::calculate_ManualProcessWindow_MaterialLengthMaxAndMin()
{
    // 计算手动加工界面中的   料长上下限
    if(LeftAngleFeedBack() == 0 && RightAngleFeedBack() == 0)
    {
        if(MechineChangeAngleMode() == true)
        {
            float Min = Angle45SafeDistance().toFloat();
            float Max = MaxCutLength().toFloat();

            setManual_MaterialLengthMin(QString("%1").arg(Min));
            setManual_MaterialLengthMax(QString("%1").arg(Max));

            // qDebug()<<"45度安全位置:  "<<Angle45SafeDistance();
            // qDebug()<<"最大切割长度:  "<<MaxCutLength();
        }
        else
        {
            float Min = OriginValue().toFloat() + MaterialHeightValue().toFloat() * 2;
            float Max = MaxCutLength().toFloat() + MaterialHeightValue().toFloat() * 2;

            setManual_MaterialLengthMin(QString("%1").arg(Min));
            setManual_MaterialLengthMax(QString("%1").arg(Max));

            // qDebug()<<"原点值:  "<<OriginValue();
            // qDebug()<<"材料高度:  "<<MaterialHeightValue();
            // qDebug()<<"最大切割长度:  "<<MaxCutLength();
        }
    }
    else if(LeftAngleFeedBack() == 1 && RightAngleFeedBack() == 1)
    {
        float Min = OriginValue().toFloat();
        float Max = MaxCutLength().toFloat();

        setManual_MaterialLengthMin(QString("%1").arg(Min));
        setManual_MaterialLengthMax(QString("%1").arg(Max));

        // qDebug()<<"原点值:  "<<OriginValue();
        // qDebug()<<"最大切割长度:  "<<MaxCutLength();
    }
    else
    {
        if(MechineChangeAngleMode() == true)
        {
            float Min = Angle45SafeDistance().toFloat();
            float Max = MaxCutLength().toFloat();

            setManual_MaterialLengthMin(QString("%1").arg(Min));
            setManual_MaterialLengthMax(QString("%1").arg(Max));

            // qDebug()<<"45度安全位置:  "<<Angle45SafeDistance();
            // qDebug()<<"最大切割长度:  "<<MaxCutLength();
        }
        else
        {
            float Min = OriginValue().toFloat() + MaterialHeightValue().toFloat();
            float Max = MaxCutLength().toFloat() + MaterialHeightValue().toFloat();

            setManual_MaterialLengthMin(QString("%1").arg(Min));
            setManual_MaterialLengthMax(QString("%1").arg(Max));

            // qDebug()<<"原点值:  "<<OriginValue();
            // qDebug()<<"材料高度:  "<<MaterialHeightValue();
            // qDebug()<<"最大切割长度:  "<<MaxCutLength();
        }
    }


    // qDebug()<<"料长下限:"<<Manual_MaterialLengthMin();
    // qDebug()<<"料长上限:"<<Manual_MaterialLengthMax();

}

void ModbusControl::read_ExtraLong_ProcessWindow_Hold()
{
    int Addr1 = 200;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setOriginValue(QString("%1").arg(combinationToFloat(resultUnit.value(11),resultUnit.value(10)),0,'f',2));
                            // qDebug()<<"原点值:"<<OriginValue();
                            setMaterialHeightValue(QString("%1").arg(combinationToFloat(resultUnit.value(15),resultUnit.value(14)),0,'f',2));
                            // qDebug()<<"手动料高值:"<<MaterialHeightValue();
                            setMaxCutLength(QString("%1").arg(combinationToFloat(resultUnit.value(17),resultUnit.value(16)),0,'f',2));
                            // qDebug()<<"最大切割长度:"<<MaxCutLength();
                            setExtraLong_MaterialLengthValue(QString("%1").arg(combinationToFloat(resultUnit.value(27),resultUnit.value(26)),0,'f',2));
                            // qDebug()<<"超长料长值:"<<ExtraLong_MaterialLengthValue();
                            setSawsMode(QString("%1").arg(resultUnit.value(29)));
                            // qDebug()<<"旋钮位置:"<<SawsMode();
                            setCurrentSegments(QString("%1").arg(resultUnit.value(31)));
                            // qDebug()<<"当前加工段数值:"<<CurrentSegments();

                        }
                    });
        }
    }

    int Addr2 = 1380;

    QModbusDataUnit readUnit2(QModbusDataUnit::HoldingRegisters,Addr2,20);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setExtraLong_CompensateValue(QString("%1").arg(combinationToFloat(resultUnit.value(3),resultUnit.value(2)),0,'f',2));
                            // qDebug()<<"超长补偿值:"<<ExtraLong_CompensateValue();
                            setAngle45SafeDistance(QString("%1").arg(combinationToFloat(resultUnit.value(15),resultUnit.value(14)),0,'f',2));
                            // qDebug()<<"45度内摆安全距离:"<<Angle45SafeDistance();

                        }
                    });
        }
    }
}

void ModbusControl::read_ExtraLong_ProcessWindow_Coils()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setMechineChangeAngleMode(resultUnit.value(394));
                            // qDebug()<<"内摆外摆:"<<MechineChangeAngleMode();
                            setLeftAngleFeedBack(resultUnit.value(390));
                            // qDebug()<<"左角度反馈值M390"<<LeftAngleFeedBack();
                            setRightAngleFeedBack(resultUnit.value(391));
                            // qDebug()<<"右角度反馈值M391"<<RightAngleFeedBack();


                        }
                    });
        }
    }
}

void ModbusControl::read_ExtraLong_ProcessWindow_DiscreteInputs()
{
    int addr1 = 13312;

    QModbusDataUnit readUnit1(QModbusDataUnit::DiscreteInputs,addr1,30);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();
                            setIO_X12(resultUnit.value(10));  // X12
                            setIO_X13(resultUnit.value(11)); // X13
                            setIO_X14(resultUnit.value(12));  // X14
                            setIO_X15(resultUnit.value(13)); // X15

                            // qDebug()<<"X12"<<IO_X12();
                            // qDebug()<<"X13"<<IO_X13();
                            // qDebug()<<"X14"<<IO_X14();
                            // qDebug()<<"X15"<<IO_X15();
                        }
                        else
                        {
                            qDebug()<<"读取 X12 X13 X14 X15"<<reply->errorString();
                        }

                        reply->deleteLater();
                    });
        }
    }
}

void ModbusControl::calculate_ExtraLong_ProcessWindow_MaterialLengthMaxAndMin()
{

    float Min = 0;
    float Max = 0;
    // 计算手动加工界面中的   料长上下限
    if(LeftAngleFeedBack() == 0 && RightAngleFeedBack() == 0)
    {
        if(MechineChangeAngleMode() == true)
        {
            Min = MaxCutLength().toFloat();
            Max = MaxCutLength().toFloat()*2 - Angle45SafeDistance().toFloat();

            setExtraLong_MaterialLengthMin(QString("%1").arg(Min));
            setExtraLong_MaterialLengthMax(QString("%1").arg(Max));
        }
        else
        {
            Min = MaxCutLength().toFloat() + MaterialHeightValue().toFloat() * 2;
            Max = MaxCutLength().toFloat() * 2 + MaterialHeightValue().toFloat() * 2 - OriginValue().toFloat();

            setExtraLong_MaterialLengthMin(QString("%1").arg(Min));
            setExtraLong_MaterialLengthMax(QString("%1").arg(Max));
        }
    }
    else if(LeftAngleFeedBack() == 1 && RightAngleFeedBack() == 1)
    {
        Min = MaxCutLength().toFloat();
        Max = MaxCutLength().toFloat() * 2 - OriginValue().toFloat();

        setExtraLong_MaterialLengthMin(QString("%1").arg(Min));
        setExtraLong_MaterialLengthMax(QString("%1").arg(Max));
    }
    else
    {
        if(MechineChangeAngleMode() == true)
        {
            Min = MaxCutLength().toFloat();
            Max = MaxCutLength().toFloat() * 2 - Angle45SafeDistance().toFloat();

            setExtraLong_MaterialLengthMin(QString("%1").arg(Min));
            setExtraLong_MaterialLengthMax(QString("%1").arg(Max));
        }
        else
        {
            Min = MaxCutLength().toFloat() + MaterialHeightValue().toFloat();
            Max = MaxCutLength().toFloat() * 2 + MaterialHeightValue().toFloat() - OriginValue().toFloat();

            setExtraLong_MaterialLengthMin(QString("%1").arg(Min));
            setExtraLong_MaterialLengthMax(QString("%1").arg(Max));
        }
    }


    // qDebug()<<"超长料长下限:"<<ExtraLong_MaterialLengthMin();
    // qDebug()<<"超长料长上限:"<<ExtraLong_MaterialLengthMax();


    // if(ExtraLong_MaterialLengthValue().toFloat() < ExtraLong_MaterialLengthMin().toFloat())
    // {
    //     write_Modbus_RTU_Hold_32(226,ExtraLong_MaterialLengthMin());
    // }

    // if(ExtraLong_MaterialLengthValue().toFloat() > ExtraLong_MaterialLengthMax().toFloat())
    // {
    //     write_Modbus_RTU_Hold_32(226,ExtraLong_MaterialLengthMax());
    // }
}

void ModbusControl::read_ExtraShort_ProcessWindow_Hold()
{
    int Addr1 = 200;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setOriginValue(QString("%1").arg(combinationToFloat(resultUnit.value(11),resultUnit.value(10)),0,'f',2));
                            // qDebug()<<"原点值:"<<OriginValue();
                            setMaterialHeightValue(QString("%1").arg(combinationToFloat(resultUnit.value(15),resultUnit.value(14)),0,'f',2));
                            // qDebug()<<"手动料高值:"<<MaterialHeightValue();
                            setExtraShort_MaterialLengthValue(QString("%1").arg(combinationToFloat(resultUnit.value(25),resultUnit.value(24)),0,'f',2));
                            // qDebug()<<"超短料长:"<<ExtraLong_MaterialLengthValue();
                            setSawsMode(QString("%1").arg(resultUnit.value(29)));
                            // qDebug()<<"旋钮位置:"<<SawsMode();
                            setCurrentSegments(QString("%1").arg(resultUnit.value(31)));
                            // qDebug()<<"当前加工段数值:"<<CurrentSegments();

                        }
                    });
        }
    }

    int Addr2 = 1380;

    QModbusDataUnit readUnit2(QModbusDataUnit::HoldingRegisters,Addr2,20);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setExtraShort_CompensateValue(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0)),0,'f',2));
                            // qDebug()<<"超短补偿:"<<ExtraShort_CompensateValue();
                            setExtraShort_PullBackDistance(QString("%1").arg(combinationToFloat(resultUnit.value(11),resultUnit.value(10)),0,'f',2));
                            // qDebug()<<"超短补偿:"<<ExtraShort_PullBackDistance();
                            setAngle45SafeDistance(QString("%1").arg(combinationToFloat(resultUnit.value(15),resultUnit.value(14)),0,'f',2));
                            // qDebug()<<"45度内摆安全距离:"<<Angle45SafeDistance();

                        }
                    });
        }
    }
}

void ModbusControl::read_ExtraShort_ProcessWindow_Coils()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setMechineChangeAngleMode(resultUnit.value(394));
                            // qDebug()<<"内摆外摆:"<<MechineChangeAngleMode();
                            setLeftAngleFeedBack(resultUnit.value(390));
                            // qDebug()<<"左角度反馈值M390"<<LeftAngleFeedBack();
                            setRightAngleFeedBack(resultUnit.value(391));
                            // qDebug()<<"右角度反馈值M391"<<RightAngleFeedBack();


                        }
                    });
        }
    }
}

void ModbusControl::read_ExtraShort_ProcessWindow_DiscreteInputs()
{
    int addr1 = 13312;

    QModbusDataUnit readUnit1(QModbusDataUnit::DiscreteInputs,addr1,30);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();
                            setIO_X12(resultUnit.value(10));  // X12
                            setIO_X13(resultUnit.value(11)); // X13
                            setIO_X14(resultUnit.value(12));  // X14
                            setIO_X15(resultUnit.value(13)); // X15

                            // qDebug()<<"X12"<<IO_X12();
                            // qDebug()<<"X13"<<IO_X13();
                            // qDebug()<<"X14"<<IO_X14();
                            // qDebug()<<"X15"<<IO_X15();
                        }
                        else
                        {
                            qDebug()<<"读取 X12 X13 X14 X15"<<reply->errorString();
                        }

                        reply->deleteLater();
                    });
        }
    }
}

void ModbusControl::calculate_ExtraShort_ProcessWindow_MaterialLengthMaxAndMin()
{
    float Min = 0;
    float Max = 0;
    // 计算手动加工界面中的   料长上下限
    if(LeftAngleFeedBack() == 0 && RightAngleFeedBack() == 0)
    {
        if(MechineChangeAngleMode() == true)
        {
            Min = Angle45SafeDistance().toFloat() - ExtraShort_PullBackDistance().toFloat();
            Max = Angle45SafeDistance().toFloat();

            setExtraShort_MaterialLengthMin(QString("%1").arg(Min));
            setExtraShort_MaterialLengthMax(QString("%1").arg(Max));
        }
        else
        {
            Min = OriginValue().toFloat() - ExtraShort_PullBackDistance().toFloat() + MaterialHeightValue().toFloat() * 2;
            Max = OriginValue().toFloat() + MaterialHeightValue().toFloat() * 2;

            setExtraShort_MaterialLengthMin(QString("%1").arg(Min));
            setExtraShort_MaterialLengthMax(QString("%1").arg(Max));
        }
    }
    else if(LeftAngleFeedBack() == 1 && RightAngleFeedBack() == 1)
    {
        Min = OriginValue().toFloat() - ExtraShort_PullBackDistance().toFloat();
        Max = OriginValue().toFloat();

        setExtraShort_MaterialLengthMin(QString("%1").arg(Min));
        setExtraShort_MaterialLengthMax(QString("%1").arg(Max));
    }
    else
    {
        if(MechineChangeAngleMode() == true)
        {
            Min = Angle45SafeDistance().toFloat() - ExtraShort_PullBackDistance().toFloat();
            Max = Angle45SafeDistance().toFloat();

            setExtraShort_MaterialLengthMin(QString("%1").arg(Min));
            setExtraShort_MaterialLengthMax(QString("%1").arg(Max));
        }
        else
        {
            Min = OriginValue().toFloat() - ExtraShort_PullBackDistance().toFloat() + MaterialHeightValue().toFloat();
            Max = OriginValue().toFloat() + MaterialHeightValue().toFloat();

            setExtraShort_MaterialLengthMin(QString("%1").arg(Min));
            setExtraShort_MaterialLengthMax(QString("%1").arg(Max));
        }
    }


    // qDebug()<<"超短料长下限:"<<ExtraShort_MaterialLengthMin();
    // qDebug()<<"超短料长上限:"<<ExtraShort_MaterialLengthMin();


    // if(ExtraLong_MaterialLengthValue().toFloat() < ExtraLong_MaterialLengthMin().toFloat())
    // {
    //     write_Modbus_RTU_Hold_32(226,ExtraLong_MaterialLengthMin());
    // }

    // if(ExtraLong_MaterialLengthValue().toFloat() > ExtraLong_MaterialLengthMax().toFloat())
    // {
    //     write_Modbus_RTU_Hold_32(226,ExtraLong_MaterialLengthMax());
    // }
}

void ModbusControl::read_Corner_ProcessWindow_Hold()
{
    int Addr1 = 200;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setCorner_Set_Segments(QString("%1").arg(resultUnit.value(28)));
                            // qDebug()<<"角码设定段数:"<<Corner_Set_Segments();
                            setSawsMode(QString("%1").arg(resultUnit.value(29)));
                            // qDebug()<<"旋钮位置:"<<SawsMode();
                        }
                    });
        }
    }

    int Addr2 = 1270;

    QModbusDataUnit readUnit2(QModbusDataUnit::HoldingRegisters,Addr2,40);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setCorner_Current_Segments(QString("%1").arg(resultUnit.value(0)));
                            // qDebug()<<"角码当前段数:"<<Corner_Current_Segments();
                            setCorner_Worked_Segments(QString("%1").arg(resultUnit.value(1)));
                            // qDebug()<<"角码累计段数:"<<Corner_Worked_Segments();
                            setCorner_Length(QString("%1").arg(combinationToFloat(resultUnit.value(3),resultUnit.value(2)),0,'f',2));
                            // qdEbug()<<"角码长度:"<<Corner_Length();
                            setCorner_Cut_Compensate(QString("%1").arg(combinationToFloat(resultUnit.value(5),resultUnit.value(4)),0,'f',2));
                            // qDebug()<<"角码刀补:"<<Corner_Cut_Compensate();
                            setCorner_Material_Length(QString("%1").arg(combinationToFloat(resultUnit.value(7),resultUnit.value(6)),0,'f',2));
                            // qDebug()<<"角码-原料长度:"<<Corner_Material_Length();
                            setCorner_Min_Length(QString("%1").arg(combinationToFloat(resultUnit.value(23),resultUnit.value(22)),0,'f',2));
                            // qDebug()<<"角码最短料长:"<<Corner_Min_Length();
                        }
                    });
        }
    }
}

void ModbusControl::read_Corner_ProcessWindow_Coils()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setCorner_Set_Err(resultUnit.value(114));
                            //qDebug()<<"角码设定错误:"<<Corner_Set_Err();
                            setLeftAngleFeedBack(resultUnit.value(390));
                            // qDebug()<<"左角度反馈值M390"<<LeftAngleFeedBack();
                            setRightAngleFeedBack(resultUnit.value(391));
                            // qDebug()<<"右角度反馈值M391"<<RightAngleFeedBack();


                        }
                    });
        }
    }
}

void ModbusControl::read_Corner_ProcessWindow_DiscreteInputs()
{
    int addr1 = 13312;

    QModbusDataUnit readUnit1(QModbusDataUnit::DiscreteInputs,addr1,30);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();
                            setIO_X12(resultUnit.value(10));  // X12
                            setIO_X13(resultUnit.value(11)); // X13
                            setIO_X14(resultUnit.value(12));  // X14
                            setIO_X15(resultUnit.value(13)); // X15

                            // qDebug()<<"X12"<<IO_X12();
                            // qDebug()<<"X13"<<IO_X13();
                            // qDebug()<<"X14"<<IO_X14();
                            // qDebug()<<"X15"<<IO_X15();
                        }
                        else
                        {
                            qDebug()<<"读取 X12 X13 X14 X15"<<reply->errorString();
                        }

                        reply->deleteLater();
                    });
        }
    }
}

void ModbusControl::read_Order_Process_Window_Hold()
{
    int Addr1 = 76;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();
                            setOrderNumber_OrderProcess(QString("%1").arg(resultUnit.value(0)));
                            // qDebug()<<"排料加工序号: D192  : "<<QString("%1").arg(resultUnit.value(116));
                            setOrder_Number_Circle(QString("%1").arg(resultUnit.value(116)));
                            // qDebug()<<"排料加工序号: " <<Order_Number_Circle();
                        }
                    });
        }
    }

    int Addr2 = 229;

    QModbusDataUnit readUnit2(QModbusDataUnit::HoldingRegisters,Addr2,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();
                            setSawsMode(QString("%1").arg(resultUnit.value(0)));

                        }
                    });
        }
    }

    int Addr3 = 1500;

    QModbusDataUnit readUnit3(QModbusDataUnit::HoldingRegisters,Addr3,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit3,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();
                            setWorkedCount_01_OrderProcess(QString("%1").arg(resultUnit.value(0)));
                            setWorkedCount_02_OrderProcess(QString("%1").arg(resultUnit.value(1)));
                            setWorkedCount_03_OrderProcess(QString("%1").arg(resultUnit.value(2)));
                            setWorkedCount_04_OrderProcess(QString("%1").arg(resultUnit.value(3)));
                            setWorkedCount_05_OrderProcess(QString("%1").arg(resultUnit.value(4)));
                            setWorkedCount_06_OrderProcess(QString("%1").arg(resultUnit.value(5)));
                            setWorkedCount_07_OrderProcess(QString("%1").arg(resultUnit.value(6)));
                            setWorkedCount_08_OrderProcess(QString("%1").arg(resultUnit.value(7)));
                            setWorkedCount_09_OrderProcess(QString("%1").arg(resultUnit.value(8)));
                            setWorkedCount_10_OrderProcess(QString("%1").arg(resultUnit.value(9)));
                            setWorkedCount_11_OrderProcess(QString("%1").arg(resultUnit.value(10)));
                            setWorkedCount_12_OrderProcess(QString("%1").arg(resultUnit.value(11)));
                            setWorkedCount_13_OrderProcess(QString("%1").arg(resultUnit.value(12)));
                            setWorkedCount_14_OrderProcess(QString("%1").arg(resultUnit.value(13)));
                            setWorkedCount_15_OrderProcess(QString("%1").arg(resultUnit.value(14)));
                            setWorkedCount_16_OrderProcess(QString("%1").arg(resultUnit.value(15)));
                            setWorkedCount_17_OrderProcess(QString("%1").arg(resultUnit.value(16)));
                            setWorkedCount_18_OrderProcess(QString("%1").arg(resultUnit.value(17)));
                            setWorkedCount_19_OrderProcess(QString("%1").arg(resultUnit.value(18)));
                            setWorkedCount_20_OrderProcess(QString("%1").arg(resultUnit.value(19)));

                        }
                    });
        }
    }


}

void ModbusControl::read_Order_Process_Window_Coils()
{
    int Addr1 = 250;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            // qDebug()<<"259  : "<<QString("%1").arg(resultUnit.value(9));
                            setCircle_Mode(QString("%1").arg(resultUnit.value(9)));
                            // qDebug()<<"263  : "<<QString("%1").arg(resultUnit.value(13));
                            setCircle_Runing_State(QString("%1").arg(resultUnit.value(13)));
                        }
                    });
        }
    }
}

void ModbusControl::read_QR_Code_Process_Window_Hold()
{
    int Addr1 = 77;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();
                            setOrderNumber_ListProcess(QString("%1").arg(resultUnit.value(0)));

                            // qDebug()<<"当前页码 2 ："<<QString("%1").arg(resultUnit.value(113));
                            setNetWork_CurrentPages(QString("%1").arg(resultUnit.value(113)));

                        }
                    });
        }
    }

    int Addr2 = 1600;

    QModbusDataUnit readUnit2(QModbusDataUnit::HoldingRegisters,Addr2,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setMaterialLength01_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0)),0,'f',2));
                            setMaterialLength02_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(3),resultUnit.value(2)),0,'f',2));
                            setMaterialLength03_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(5),resultUnit.value(4)),0,'f',2));
                            setMaterialLength04_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(7),resultUnit.value(6)),0,'f',2));
                            setMaterialLength05_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(9),resultUnit.value(8)),0,'f',2));
                            setMaterialLength06_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(11),resultUnit.value(10)),0,'f',2));
                            setMaterialLength07_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(13),resultUnit.value(12)),0,'f',2));
                            setMaterialLength08_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(15),resultUnit.value(14)),0,'f',2));
                            setMaterialLength09_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(17),resultUnit.value(16)),0,'f',2));
                            setMaterialLength10_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(19),resultUnit.value(18)),0,'f',2));
                            setMaterialLength11_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(21),resultUnit.value(20)),0,'f',2));
                            setMaterialLength12_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(23),resultUnit.value(22)),0,'f',2));
                            setMaterialLength13_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(25),resultUnit.value(24)),0,'f',2));
                            setMaterialLength14_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(27),resultUnit.value(26)),0,'f',2));
                            setMaterialLength15_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(29),resultUnit.value(28)),0,'f',2));
                            setMaterialLength16_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(31),resultUnit.value(30)),0,'f',2));
                            setMaterialLength17_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(33),resultUnit.value(32)),0,'f',2));
                            setMaterialLength18_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(35),resultUnit.value(34)),0,'f',2));
                            setMaterialLength19_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(37),resultUnit.value(36)),0,'f',2));
                            setMaterialLength20_ListProcess(QString("%1").arg(combinationToFloat(resultUnit.value(39),resultUnit.value(38)),0,'f',2));

                            setLeftAngle_01_ListProcess(QString("%1").arg(resultUnit.value(40)));
                            setRightAngle_01_ListProcess(QString("%1").arg(resultUnit.value(41)));
                            setLeftAngle_02_ListProcess(QString("%1").arg(resultUnit.value(42)));
                            setRightAngle_02_ListProcess(QString("%1").arg(resultUnit.value(43)));
                            setLeftAngle_03_ListProcess(QString("%1").arg(resultUnit.value(44)));
                            setRightAngle_03_ListProcess(QString("%1").arg(resultUnit.value(45)));
                            setLeftAngle_04_ListProcess(QString("%1").arg(resultUnit.value(46)));
                            setRightAngle_04_ListProcess(QString("%1").arg(resultUnit.value(47)));
                            setLeftAngle_05_ListProcess(QString("%1").arg(resultUnit.value(48)));
                            setRightAngle_05_ListProcess(QString("%1").arg(resultUnit.value(49)));
                            setLeftAngle_06_ListProcess(QString("%1").arg(resultUnit.value(50)));
                            setRightAngle_06_ListProcess(QString("%1").arg(resultUnit.value(51)));
                            setLeftAngle_07_ListProcess(QString("%1").arg(resultUnit.value(52)));
                            setRightAngle_07_ListProcess(QString("%1").arg(resultUnit.value(53)));
                            setLeftAngle_08_ListProcess(QString("%1").arg(resultUnit.value(54)));
                            setRightAngle_08_ListProcess(QString("%1").arg(resultUnit.value(55)));
                            setLeftAngle_09_ListProcess(QString("%1").arg(resultUnit.value(56)));
                            setRightAngle_09_ListProcess(QString("%1").arg(resultUnit.value(57)));
                            setLeftAngle_10_ListProcess(QString("%1").arg(resultUnit.value(58)));
                            setRightAngle_10_ListProcess(QString("%1").arg(resultUnit.value(59)));
                            setLeftAngle_11_ListProcess(QString("%1").arg(resultUnit.value(60)));
                            setRightAngle_11_ListProcess(QString("%1").arg(resultUnit.value(61)));
                            setLeftAngle_12_ListProcess(QString("%1").arg(resultUnit.value(62)));
                            setRightAngle_12_ListProcess(QString("%1").arg(resultUnit.value(63)));
                            setLeftAngle_13_ListProcess(QString("%1").arg(resultUnit.value(64)));
                            setRightAngle_13_ListProcess(QString("%1").arg(resultUnit.value(65)));
                            setLeftAngle_14_ListProcess(QString("%1").arg(resultUnit.value(66)));
                            setRightAngle_14_ListProcess(QString("%1").arg(resultUnit.value(67)));
                            setLeftAngle_15_ListProcess(QString("%1").arg(resultUnit.value(68)));
                            setRightAngle_15_ListProcess(QString("%1").arg(resultUnit.value(69)));
                            setLeftAngle_16_ListProcess(QString("%1").arg(resultUnit.value(70)));
                            setRightAngle_16_ListProcess(QString("%1").arg(resultUnit.value(71)));
                            setLeftAngle_17_ListProcess(QString("%1").arg(resultUnit.value(72)));
                            setRightAngle_17_ListProcess(QString("%1").arg(resultUnit.value(73)));
                            setLeftAngle_18_ListProcess(QString("%1").arg(resultUnit.value(74)));
                            setRightAngle_18_ListProcess(QString("%1").arg(resultUnit.value(75)));
                            setLeftAngle_19_ListProcess(QString("%1").arg(resultUnit.value(76)));
                            setRightAngle_19_ListProcess(QString("%1").arg(resultUnit.value(77)));
                            setLeftAngle_20_ListProcess(QString("%1").arg(resultUnit.value(78)));
                            setRightAngle_20_ListProcess(QString("%1").arg(resultUnit.value(79)));

                            setCutCount_01_ListProcess(QString("%1").arg(resultUnit.value(80)));
                            setCutCount_02_ListProcess(QString("%1").arg(resultUnit.value(81)));
                            setCutCount_03_ListProcess(QString("%1").arg(resultUnit.value(82)));
                            setCutCount_04_ListProcess(QString("%1").arg(resultUnit.value(83)));
                            setCutCount_05_ListProcess(QString("%1").arg(resultUnit.value(84)));
                            setCutCount_06_ListProcess(QString("%1").arg(resultUnit.value(85)));
                            setCutCount_07_ListProcess(QString("%1").arg(resultUnit.value(86)));
                            setCutCount_08_ListProcess(QString("%1").arg(resultUnit.value(87)));
                            setCutCount_09_ListProcess(QString("%1").arg(resultUnit.value(88)));
                            setCutCount_10_ListProcess(QString("%1").arg(resultUnit.value(89)));
                            setCutCount_11_ListProcess(QString("%1").arg(resultUnit.value(90)));
                            setCutCount_12_ListProcess(QString("%1").arg(resultUnit.value(91)));
                            setCutCount_13_ListProcess(QString("%1").arg(resultUnit.value(92)));
                            setCutCount_14_ListProcess(QString("%1").arg(resultUnit.value(93)));
                            setCutCount_15_ListProcess(QString("%1").arg(resultUnit.value(94)));
                            setCutCount_16_ListProcess(QString("%1").arg(resultUnit.value(95)));
                            setCutCount_17_ListProcess(QString("%1").arg(resultUnit.value(96)));
                            setCutCount_18_ListProcess(QString("%1").arg(resultUnit.value(97)));
                            setCutCount_19_ListProcess(QString("%1").arg(resultUnit.value(98)));
                            setCutCount_20_ListProcess(QString("%1").arg(resultUnit.value(99)));

                            setWorkedCount_01_ListProcess(QString("%1").arg(resultUnit.value(100)));
                            setWorkedCount_02_ListProcess(QString("%1").arg(resultUnit.value(101)));
                            setWorkedCount_03_ListProcess(QString("%1").arg(resultUnit.value(102)));
                            setWorkedCount_04_ListProcess(QString("%1").arg(resultUnit.value(103)));
                            setWorkedCount_05_ListProcess(QString("%1").arg(resultUnit.value(104)));
                            setWorkedCount_06_ListProcess(QString("%1").arg(resultUnit.value(105)));
                            setWorkedCount_07_ListProcess(QString("%1").arg(resultUnit.value(106)));
                            setWorkedCount_08_ListProcess(QString("%1").arg(resultUnit.value(107)));
                            setWorkedCount_09_ListProcess(QString("%1").arg(resultUnit.value(108)));
                            setWorkedCount_10_ListProcess(QString("%1").arg(resultUnit.value(109)));
                            setWorkedCount_11_ListProcess(QString("%1").arg(resultUnit.value(110)));
                            setWorkedCount_12_ListProcess(QString("%1").arg(resultUnit.value(111)));
                            setWorkedCount_13_ListProcess(QString("%1").arg(resultUnit.value(112)));
                            setWorkedCount_14_ListProcess(QString("%1").arg(resultUnit.value(113)));
                            setWorkedCount_15_ListProcess(QString("%1").arg(resultUnit.value(114)));
                            setWorkedCount_16_ListProcess(QString("%1").arg(resultUnit.value(115)));
                            setWorkedCount_17_ListProcess(QString("%1").arg(resultUnit.value(116)));
                            setWorkedCount_18_ListProcess(QString("%1").arg(resultUnit.value(117)));
                            setWorkedCount_19_ListProcess(QString("%1").arg(resultUnit.value(118)));
                            setWorkedCount_20_ListProcess(QString("%1").arg(resultUnit.value(119)));

                        }
                    });
        }
    }


}

void ModbusControl::read_QR_Code_Process_Window_Coils()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setLocation_Rely_ListProcess(resultUnit.value(172));
                            // qDebug()<<"定位中继:"<<Location_Rely_ListProcess();
                            setMechineChangeAngleMode(resultUnit.value(394));
                            // qDebug()<<"机械摆动方式 : "<<MechineChangeAngleMode();
                        }
                    });
        }
    }
}

void ModbusControl::set_List_Process_Window_Location()
{
    if(MechineChangeAngleMode() == false)
    {
        write_Modbus_RTU_Coils(140,"1");
        write_Modbus_RTU_Coils(141,"1");
        write_Modbus_RTU_Coils(140,"0");
        write_Modbus_RTU_Coils(141,"0");
    }
    else
    {
        write_Modbus_RTU_Coils(140,"1");
        write_Modbus_RTU_Coils(140,"0");
    }

    write_Modbus_RTU_Coils(172,"0");
}

void ModbusControl::read_NetWork_Process_List_Coils()
{

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,60,100);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();
                            // qDebug()<<"M_61:"<<resultUnit.value(1);
                            // qDebug()<<"M_96:"<<resultUnit.value(36);
                            // qDebug()<<"M_97:"<<resultUnit.value(37);
                            setNetWork_M61(resultUnit.value(1));
                            setNetWork_M96(resultUnit.value(36));
                            setNetWork_M97(resultUnit.value(37));

                        }
                    });
        }
    }
}

void ModbusControl::read_NetWork_Process_List_DiscreteInputs()
{

    QModbusDataUnit readUnit1(QModbusDataUnit::DiscreteInputs,13312,30);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setIO_X13(resultUnit.value(11)); // X 13

                            // qDebug()<<"X12"<<IO_X12();
                            // qDebug()<<"X13"<<IO_X13();
                            // qDebug()<<"X14"<<IO_X14();
                            // qDebug()<<"X15"<<IO_X15();
                        }
                        else
                        {
                            qDebug()<<"读取 X12 X13 X14 X15"<<reply->errorString();
                        }

                        reply->deleteLater();
                    });
        }
    }
}

void ModbusControl::read_Manager_Setting_Window_Hold()
{
    int Addr1 = 100;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setMaterialHeightObservedValue(QString("%1").arg(combinationToFloat(resultUnit.value(7),resultUnit.value(6)),0,'f',2));
                            //qDebug()<<"料高测量值:"<<MaterialHeightObservedValue();
                        }
                    });
        }
    }
}

void ModbusControl::read_Manager_Setting_Window_Coils()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setObservingState(resultUnit.value(109));
                            // qDebug()<<"料高测量中:"<<ObservingState();
                        }
                    });
        }
    }
}

void ModbusControl::read_Manager_Setting_Window_DiscreteInput()
{
    int Addr1 = 13056;

    QModbusDataUnit readUnit1(QModbusDataUnit::DiscreteInputs,Addr1,30);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setIO_Y2(resultUnit.value(2));
                            // qDebug()<<"左电机:"<<IO_Y2();
                            setIO_Y3(resultUnit.value(3));
                            // qDebug()<<"右电机:"<<IO_Y3();
                            setIO_Y4(resultUnit.value(4));
                            // qDebug()<<"左45度阀门:"<<IO_Y4();
                            setIO_Y5(resultUnit.value(5));
                            // qDebug()<<"左90度阀门:"<<IO_Y5();
                            setIO_Y6(resultUnit.value(6));
                            // qDebug()<<"右45度阀门:"<<IO_Y6();
                            setIO_Y7(resultUnit.value(7));
                            // qDebug()<<"右90度阀门:"<<IO_Y7();
                            setIO_Y10(resultUnit.value(8));
                            // qDebug()<<"左工进:"<<IO_Y10();
                            setIO_Y11(resultUnit.value(9));
                            // qDebug()<<"右工进:"<<IO_Y11();
                            setIO_Y12(resultUnit.value(10));
                            // qDebug()<<"左压紧:"<<IO_Y12();
                            setIO_Y13(resultUnit.value(11));
                            // qDebug()<<"右压紧:"<<IO_Y13();
                            setIO_Y14(resultUnit.value(12));
                            // qDebug()<<"料高气缸:"<<IO_Y14();
                            setIO_Y21(resultUnit.value(17));
                            // qDebug()<<"拽料气缸:"<<IO_Y21();
                            setIO_Y23(resultUnit.value(19));
                            // qDebug()<<"左侧拉料:"<<IO_Y23();

                        }
                        else
                        {
                            qDebug()<<"读取 Y0 - Y25 失败"<<reply->errorString();
                        }

                        reply->deleteLater();
                    });
        }
    }
}

void ModbusControl::read_IO_Monitor_Window_DiscreteInputs()
{
    int Addr1 = 13056;

    QModbusDataUnit readUnit1(QModbusDataUnit::DiscreteInputs,Addr1,30);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setIO_Y0(resultUnit.value(0));
                            // qDebug()<<"脉冲:"<<IO_Y0();
                            setIO_Y1(resultUnit.value(1));
                            // qDebug()<<"方向:"<<IO_Y1();
                            setIO_Y2(resultUnit.value(2));
                            // qDebug()<<"左电机:"<<IO_Y2();
                            setIO_Y3(resultUnit.value(3));
                            // qDebug()<<"右电机:"<<IO_Y3();
                            setIO_Y4(resultUnit.value(4));
                            // qDebug()<<"左45度阀门:"<<IO_Y4();
                            setIO_Y5(resultUnit.value(5));
                            // qDebug()<<"左90度阀门:"<<IO_Y5();
                            setIO_Y6(resultUnit.value(6));
                            // qDebug()<<"右45度阀门:"<<IO_Y6();
                            setIO_Y7(resultUnit.value(7));
                            // qDebug()<<"右90度阀门:"<<IO_Y7();
                            setIO_Y10(resultUnit.value(8));
                            // qDebug()<<"左工进:"<<IO_Y10();
                            setIO_Y11(resultUnit.value(9));
                            // qDebug()<<"右工进:"<<IO_Y11();
                            setIO_Y12(resultUnit.value(10));
                            // qDebug()<<"左压紧:"<<IO_Y12();
                            setIO_Y13(resultUnit.value(11));
                            // qDebug()<<"右压紧:"<<IO_Y13();
                            setIO_Y14(resultUnit.value(12));
                            // qDebug()<<"料高气缸:"<<IO_Y14();
                            setIO_Y15(resultUnit.value(13));
                            // qDebug()<<"前托料架:"<<IO_Y15();
                            setIO_Y16(resultUnit.value(14));
                            // qDebug()<<"中拖料架:"<<IO_Y16();
                            setIO_Y17(resultUnit.value(15));
                            // qDebug()<<"后托料架:"<<IO_Y17();
                            setIO_Y20(resultUnit.value(16));
                            // qDebug()<<"刹车气缸:"<<IO_Y20();
                            setIO_Y21(resultUnit.value(17));
                            // qDebug()<<"拽料气缸:"<<IO_Y21();
                            setIO_Y22(resultUnit.value(18));
                            // qDebug()<<"左拉料压紧:"<<IO_Y22();
                            setIO_Y23(resultUnit.value(19));
                            // qDebug()<<"左侧拉料:"<<IO_Y23();
                            setIO_Y24(resultUnit.value(20));
                            // qDebug()<<"吹气阀:"<<IO_Y24();
                            setIO_Y25(resultUnit.value(21));
                            // qDebug()<<"左右吹气阀:"<<IO_Y25();

                        }
                        else
                        {
                            qDebug()<<"读取 Y0 - Y25 失败"<<reply->errorString();
                        }

                        reply->deleteLater();
                    });
        }
    }


    // qDebug()<<"读取 - 开关量";
    int Addr2 = 13312;

    QModbusDataUnit readUnit2(QModbusDataUnit::DiscreteInputs,Addr2,30);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setIO_X0(resultUnit.value(0));
                            // qDebug()<<"磁尺A相:"<<IO_X0();
                            setIO_X1(resultUnit.value(1));
                            // qDebug()<<"磁尺B相:"<<IO_X1();
                            setIO_X2(resultUnit.value(2));
                            // qDebug()<<"左机头旋钮:"<<IO_X2();
                            setIO_X3(resultUnit.value(3));
                            // qDebug()<<"右机头旋钮:"<<IO_X3();
                            setIO_X5(resultUnit.value(5));
                            // qDebug()<<"急停按钮:"<<IO_X5();
                            setIO_X6(resultUnit.value(6));
                            // qDebug()<<"压紧按钮:"<<IO_X6();
                            setIO_X7(resultUnit.value(7));
                            // qDebug()<<"工进按钮:"<<IO_X7();
                            setIO_X10(resultUnit.value(8));
                            // qDebug()<<"锯片启停:"<<IO_X10();
                            setIO_X11(resultUnit.value(9));
                            // qDebug()<<"原点复位:"<<IO_X11();
                            setIO_X12(resultUnit.value(10));
                            // qDebug()<<"左锯片后位:"<<IO_X12();
                            setIO_X13(resultUnit.value(11));
                            // qDebug()<<"右锯片后位"<<IO_X13();
                            setIO_X14(resultUnit.value(12));
                            // qDebug()<<"左锯片前位:"<<IO_X14();
                            setIO_X15(resultUnit.value(13));
                            // qDebug()<<"右锯片前位:"<<IO_X15();
                            setIO_X16(resultUnit.value(14));
                            // qDebug()<<"伺服报警:"<<IO_X16();
                            setIO_X17(resultUnit.value(15));
                            // qDebug()<<"伺服准备好:"<<IO_X17();
                            setIO_X20(resultUnit.value(16));
                            // qDebug()<<"X轴原点:"<<IO_X20();
                            setIO_X21(resultUnit.value(17));
                            // qDebug()<<"X轴正限位:"<<IO_X21();
                            setIO_X22(resultUnit.value(18));
                            // qDebug()<<"X轴负限位:"<<IO_X22();
                            setIO_X23(resultUnit.value(19));
                            // qDebug()<<"前托退到位:"<<IO_X23();
                            setIO_X24(resultUnit.value(20));
                            // qDebug()<<"中托退到位:"<<IO_X24();
                            setIO_X25(resultUnit.value(21));
                            // qDebug()<<"后托退到位:"<<IO_X25();


                        }
                        else
                        {
                            qDebug()<<"读取 开关量 X0 - X25失败"<<reply->errorString();
                        }

                        reply->deleteLater();
                    });
        }
    }







}

void ModbusControl::read_Printer_Setting_Window_Hold()
{
    int Addr1 = 64;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,2);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setWait_Worked_MaterialLength(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0)),0,'f',2));
                        }
                    });
        }
    }

    int Addr2 = 214;

    QModbusDataUnit readUnit2(QModbusDataUnit::HoldingRegisters,Addr2,2);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
            {
                if(reply->error() == QModbusDevice::NoError)
                {
                    const QModbusDataUnit resultUnit = reply->result();

                    setMaterialHeightValue(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0)),0,'f',2));

                    // if(MechineChangeAngleMode())
                    // {
                    //     qDebug()<<"无须料高";
                    //     emit printer_Active_Sig(LeftAngleFeedBack(),RightAngleFeedBack(),Wait_Worked_MaterialLength(),"");
                    // }
                    // else
                    // {
                    //     qDebug()<<"料高:"<<MaterialHeightValue();
                    //     emit printer_Active_Sig(LeftAngleFeedBack(),RightAngleFeedBack(),Wait_Worked_MaterialLength(),MaterialHeightValue());
                    // }

                }
            });
        }
    }
}

void ModbusControl::read_Printer_Setting_Window_Coils()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setLeftAngleFeedBack(resultUnit.value(390));
                            setRightAngleFeedBack(resultUnit.value(391));
                            setMechineChangeAngleMode(resultUnit.value(394));

                        }
                    });
        }
    }
}

void ModbusControl::read_Mechine_Parameter_Window_Hold()
{


    int Addr1 = 200;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,100);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setLocation_Speed(QString("%1").arg(combinationToFloat(resultUnit.value(7),resultUnit.value(6)),0,'f',2));
                            // qDebug()<<"定位速度:"<<Location_Speed();
                            setOriginValue(QString("%1").arg(combinationToFloat(resultUnit.value(11),resultUnit.value(10)),0,'f',2));
                            // qDebug()<<"原点值:"<<OriginValue();
                            setLeftSaw_Out_Time(QString("%1").arg(combinationToFloat(resultUnit.value(33),resultUnit.value(32)),0,'f',1));
                            // qDebug()<<"左锯出锯时间:"<<LeftSaw_Out_Time();
                            setRightSaw_Out_Time(QString("%1").arg(combinationToFloat(resultUnit.value(35),resultUnit.value(34)),0,'f',1));
                            // qDebug()<<"右锯出锯时间:"<<RightSaw_Out_Time();
                            setPowerOff_Delay_Time(QString("%1").arg(combinationToFloat(resultUnit.value(39),resultUnit.value(38)),0,'f',1));
                            // qDebug()<<"电磁阀断电延时:"<<PowerOff_Delay_Time();

                        }
                    });
        }
    }


    int Addr2 = 300;

    QModbusDataUnit readUnit2(QModbusDataUnit::HoldingRegisters,Addr2,100);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setBlow_Time(QString("%1").arg(resultUnit.value(74)));
                            // qDebug()<<"左右吹气时间:"<<Blow_Time();
                            setSingleSaw_45_Compensate(QString("%1").arg(combinationToFloat(resultUnit.value(97),resultUnit.value(96)),0,'f',2));
                            // qDebug()<<"单锯45度补偿:"<<SingleSaw_45_Compensate();

                        }
                    });
        }
    }

    int Addr3 = 600;

    QModbusDataUnit readUnit3(QModbusDataUnit::HoldingRegisters,Addr3,100);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit3,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setTiny_Move_Distance(QString("%1").arg(combinationToFloat(resultUnit.value(61),resultUnit.value(60)),0,'f',1));
                            // qDebug()<<"压紧动作时间:"<<Impact_Active_Time();
                            setLeft_Pull_Delay(QString("%1").arg(combinationToFloat(resultUnit.value(71),resultUnit.value(70)),0,'f',1));
                            // qDebug()<<"料高测量时间:"<<MaterialHeight_ObserveTime();
                        }
                    });
        }
    }




    int Addr4 = 1280;

    QModbusDataUnit readUnit4(QModbusDataUnit::HoldingRegisters,Addr4,100);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit4,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setImpact_Active_Time(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0)),0,'f',1));
                            // qDebug()<<"压紧动作时间:"<<Impact_Active_Time();
                            setMaterialHeight_ObserveTime(QString("%1").arg(combinationToFloat(resultUnit.value(9),resultUnit.value(8)),0,'f',1));
                            // qDebug()<<"料高测量时间:"<<MaterialHeight_ObserveTime();
                            setMaterialHeight_DisplaceMent(QString("%1").arg(combinationToFloat(resultUnit.value(11),resultUnit.value(10)),0,'f',2));
                            // qDebug()<<"料高磁尺当量:"<<MaterialHeight_DisplaceMent();
                        }
                    });
        }
    }


    int Addr5 = 1380;

    QModbusDataUnit readUnit5(QModbusDataUnit::HoldingRegisters,Addr5,100);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit5,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setDoubleSaws_45_Compensate(QString("%1").arg(combinationToFloat(resultUnit.value(5),resultUnit.value(4)),0,'f',2));
                            // qDebug()<<"双锯45度补偿:"<<DoubleSaws_45_Compensate();
                            setManual_Speed(QString("%1").arg(combinationToFloat(resultUnit.value(13),resultUnit.value(12)),0,'f',2));
                            // qDebug()<<"手动速度:"<<Manual_Speed();
                            setAngle45SafeDistance(QString("%1").arg(combinationToFloat(resultUnit.value(15),resultUnit.value(14)),0,'f',2));
                            // qDebug()<<"45度安全位置:"<<Angle45SafeDistance();
                        }
                    });
        }
    }

}

void ModbusControl::read_Mechine_Parameter_Window_Coils()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setMechineChangeAngleMode(resultUnit.value(394));
                            // qDebug()<<"内摆外摆:"<<MechineChangeAngleMode();
                            setAutoObserveState(resultUnit.value(396));
                            // qDebug()<<"自动测高功能:"<<AutoObserveState();
                            setPowerOffMode(resultUnit.value(509));
                            // qDebug()<<"电磁阀断电模式:"<<PowerOffMode();

                        }
                    });
        }
    }
}

void ModbusControl::read_Servo_Parameter_Window_Hold()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setEncoder_Value(QString("%1").arg(combinationToInt(resultUnit.value(3),resultUnit.value(2))));
                            // qDebug()<<"编码器数据:"<<Encoder_Value();
                        }
                    });
        }
    }


    int Addr2 = 200;

    QModbusDataUnit readUnit2(QModbusDataUnit::HoldingRegisters,Addr2,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            // setEncoder_Value(QString("%1").arg(combinationToFloat(resultUnit.value(3),resultUnit.value(2))));
                            // qDebug()<<"编码器数据:"<<Encoder_Value();
                            setPulseNumber_PerRound(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0))));
                            // qDebug()<<"每圈脉冲数:"<<PulseNumber_PerRound();
                            setDistanceNumber_PerRound(QString("%1").arg(combinationToFloat(resultUnit.value(3),resultUnit.value(2)),0,'f',2));
                            // qDebug()<<"每圈位移量:"<<DistanceNumber_PerRound();
                            setTimeOf_ACC_DEC(QString("%1").arg(resultUnit.value(8)));
                            // qDebug()<<"加减速时间:"<<TimeOf_ACC_DEC();
                            setMaxCutLength(QString("%1").arg(combinationToFloat(resultUnit.value(17),resultUnit.value(16)),0,'f',2));
                            // qDebug()<<"最大切割长度:"<<MaxCutLength();
                            setReverse_Soft_Limit(QString("%1").arg(combinationToFloat(resultUnit.value(19),resultUnit.value(18)),0,'f',2));
                            // qDebug()<<"反向软限位:"<<Reverse_Soft_Limit();
                            setFindZero_HighSpeed(QString("%1").arg(combinationToFloat(resultUnit.value(21),resultUnit.value(20)),0,'f',2));
                            // qDebug()<<"找零点高速:"<<FindZero_HighSpeed();
                            setFindZero_LowSpeed(QString("%1").arg(combinationToFloat(resultUnit.value(23),resultUnit.value(22)),0,'f',2));
                            // qDebug()<<"找零点低速:"<<FindZero_LowSpeed();

                        }
                    });
        }
    }


    int Addr3 = 600;

    QModbusDataUnit readUnit3(QModbusDataUnit::HoldingRegisters,Addr3,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit3,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setBrake_CloseTime(QString("%1").arg(resultUnit.value(2)));
                            // qDebug()<<"刹车关闭时间:"<<Brake_CloseTime();
                        }
                    });
        }
    }


    int Addr4 = 1200;

    QModbusDataUnit readUnit4(QModbusDataUnit::HoldingRegisters,Addr4,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit4,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            // setBrake_CloseTime(QString("%1").arg(resultUnit.value(2)));
                            // qDebug()<<"刹车关闭时间:"<<Brake_CloseTime();
                            setBrake_OpenTime(QString("%1").arg(combinationToFloat(resultUnit.value(79),resultUnit.value(78)),0,'f',2));
                            // qDebug()<<"刹车打开时间:"<<Brake_OpenTime();
                        }
                    });
        }
    }




}

void ModbusControl::read_Servo_Parameter_Window_Coils()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setServoType(resultUnit.value(392));
                            // qDebug()<<"伺服类型:"<<ServoType();

                        }
                    });
        }
    }
}

void ModbusControl::read_Hold_Setting_Window_Hold()
{
    int Addr1 = 296;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            // setBrake_CloseTime(QString("%1").arg(resultUnit.value(2)));
                            // qDebug()<<"刹车关闭时间:"<<Brake_CloseTime();
                            setMid_Hold_Location_Down_Limit(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0)),0,'f',2));
                            // qDebug()<<"中托下限:"<<Mid_Hold_Location_Down_Limit();
                        }
                    });
        }
    }

    int Addr2 = 612;

    QModbusDataUnit readUnit2(QModbusDataUnit::HoldingRegisters,Addr2,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            // setBrake_CloseTime(QString("%1").arg(resultUnit.value(2)));
                            // qDebug()<<"刹车关闭时间:"<<Brake_CloseTime();
                            setHold_Safe_Distance(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0)),0,'f',2));
                            // qDebug()<<"托料架安全位置:"<<Hold_Safe_Distance();
                        }
                    });
        }
    }


    int Addr3 = 1290;

    QModbusDataUnit readUnit3(QModbusDataUnit::HoldingRegisters,Addr3,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit3,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setFront_Hold_Location(QString("%1").arg(combinationToFloat(resultUnit.value(5),resultUnit.value(4)),0,'f',2));
                            // qDebug()<<"前托料位置:"<<Front_Hold_Location();
                            setMid_Hold_Location_Up_Limit(QString("%1").arg(combinationToFloat(resultUnit.value(7),resultUnit.value(6)),0,'f',2));
                            // qDebug()<<"中托上限:"<<Front_Hold_Location();
                            setBack_Hold_Location(QString("%1").arg(combinationToFloat(resultUnit.value(9),resultUnit.value(8)),0,'f',2));
                            // qDebug()<<"后托料位置:"<<Front_Hold_Location();
                        }
                    });
        }
    }

}

void ModbusControl::read_Hold_Setting_Window_Coils()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setFront_Hold_BackOver(resultUnit.value(243));
                            // qDebug()<<"前托退到位:"<<Front_Hold_BackOver();
                            setMid_Hold_BackOver(resultUnit.value(244));
                            // qDebug()<<"中托退到位:"<<Mid_Hold_BackOver();
                            setBack_Hold_BackOver(resultUnit.value(245));
                            // qDebug()<<"后托退到位:"<<Back_Hold_BackOver();


                            setFront_Hold_Mode(resultUnit.value(384));
                            // qDebug()<<"前托料架 0 大于 1 小于:"<<Front_Hold_Mode();
                            setBack_Hold_Mode(resultUnit.value(386));
                            // qDebug()<<"后托料架 0 大于 1 小于:"<<Back_Hold_Mode();

                            setFront_Hold_Enable(resultUnit.value(387));
                            // qDebug()<<"前托料架使能:"<<Front_Hold_Enable();
                            setMid_Hold_Enable(resultUnit.value(388));
                            // qDebug()<<"中托料架使能:"<<Mid_Hold_Enable();
                            setBack_Hold_Enable(resultUnit.value(389));
                            // qDebug()<<"后托料架使能:"<<Back_Hold_Enable();

                            setHold_Exist(resultUnit.value(499));
                            // qDebug()<<"托料架检测:"<<Hold_Exist();

                        }
                    });
        }
    }
}

void ModbusControl::read_Hold_Setting_Window_DiscreteInputs()
{
    int addr1 = 13056;

    QModbusDataUnit readUnit1(QModbusDataUnit::DiscreteInputs,addr1,30);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setIO_Y15(resultUnit.value(13));
                            setIO_Y16(resultUnit.value(14));
                            setIO_Y17(resultUnit.value(15));
                        }
                        else
                        {
                            qDebug()<<"读取 Y15 Y16 Y17"<<reply->errorString();
                        }

                        reply->deleteLater();
                    });
        }
    }
}

void ModbusControl::read_Location_Compensate_Window_Hold()
{

    int Addr1 = 200;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setOriginValue(QString("%1").arg(combinationToFloat(resultUnit.value(11),resultUnit.value(10)),0,'f',2));
                            // qDebug()<<"原点值:"<<OriginValue();
                            setMaterialLengthValue(QString("%1").arg(combinationToFloat(resultUnit.value(13),resultUnit.value(12)),0,'f',2));
                            // qDebug()<<"手动料长:"<<MaterialLengthValue();
                            setMaterialHeightValue(QString("%1").arg(combinationToFloat(resultUnit.value(15),resultUnit.value(14)),0,'f',2));
                            // qDebug()<<"手动料高:"<<MaterialHeightValue();
                            setMaxCutLength(QString("%1").arg(combinationToFloat(resultUnit.value(17),resultUnit.value(16)),0,'f',2));
                            // qDebug()<<"最大切割长度:"<<MaxCutLength();

                        }
                    });
        }
    }




    int Addr2 = 1300;

    QModbusDataUnit readUnit2(QModbusDataUnit::HoldingRegisters,Addr2,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setLocation_Compensate_01(QString("%1").arg(combinationToFloat(resultUnit.value(3),resultUnit.value(2)),0,'f',2));
                            // qDebug()<<"位置补偿1:"<<Location_Compensate_01();
                            setLocation_Compensate_02(QString("%1").arg(combinationToFloat(resultUnit.value(5),resultUnit.value(4)),0,'f',2));
                            // qDebug()<<"位置补偿2:"<<Location_Compensate_02();
                            setLocation_Compensate_03(QString("%1").arg(combinationToFloat(resultUnit.value(7),resultUnit.value(6)),0,'f',2));
                            // qDebug()<<"位置补偿3:"<<Location_Compensate_03();
                            setLocation_Compensate_04(QString("%1").arg(combinationToFloat(resultUnit.value(9),resultUnit.value(8)),0,'f',2));
                            // qDebug()<<"位置补偿4:"<<Location_Compensate_04();
                            setLocation_Compensate_05(QString("%1").arg(combinationToFloat(resultUnit.value(11),resultUnit.value(10)),0,'f',2));
                            // qDebug()<<"位置补偿5:"<<Location_Compensate_05();
                            setLocation_Compensate_06(QString("%1").arg(combinationToFloat(resultUnit.value(13),resultUnit.value(12)),0,'f',2));
                            // qDebug()<<"位置补偿6:"<<Location_Compensate_06();
                            setLocation_Compensate_07(QString("%1").arg(combinationToFloat(resultUnit.value(15),resultUnit.value(14)),0,'f',2));
                            // qDebug()<<"位置补偿7:"<<Location_Compensate_07();
                            setLocation_Compensate_08(QString("%1").arg(combinationToFloat(resultUnit.value(17),resultUnit.value(16)),0,'f',2));
                            // qDebug()<<"位置补偿8:"<<Location_Compensate_08();
                            setLocation_Compensate_09(QString("%1").arg(combinationToFloat(resultUnit.value(19),resultUnit.value(18)),0,'f',2));
                            // qDebug()<<"位置补偿9:"<<Location_Compensate_09();
                            setLocation_Compensate_10(QString("%1").arg(combinationToFloat(resultUnit.value(21),resultUnit.value(20)),0,'f',2));
                            // qDebug()<<"位置补偿10:"<<Location_Compensate_10();
                            setLocation_Compensate_11(QString("%1").arg(combinationToFloat(resultUnit.value(23),resultUnit.value(22)),0,'f',2));
                            // qDebug()<<"位置补偿11:"<<Location_Compensate_11();
                            setLocation_Compensate_12(QString("%1").arg(combinationToFloat(resultUnit.value(25),resultUnit.value(24)),0,'f',2));
                            // qDebug()<<"位置补偿12:"<<Location_Compensate_12();
                            setLocation_Compensate_13(QString("%1").arg(combinationToFloat(resultUnit.value(27),resultUnit.value(26)),0,'f',2));
                            // qDebug()<<"位置补偿13:"<<Location_Compensate_13();
                            setLocation_Compensate_14(QString("%1").arg(combinationToFloat(resultUnit.value(29),resultUnit.value(28)),0,'f',2));
                            // qDebug()<<"位置补偿14:"<<Location_Compensate_14();
                            setLocation_Compensate_15(QString("%1").arg(combinationToFloat(resultUnit.value(31),resultUnit.value(30)),0,'f',2));
                            // qDebug()<<"位置补偿15:"<<Location_Compensate_15();
                            setLocation_Compensate_16(QString("%1").arg(combinationToFloat(resultUnit.value(33),resultUnit.value(32)),0,'f',2));
                            // qDebug()<<"位置补偿16:"<<Location_Compensate_16();
                            setLocation_Compensate_17(QString("%1").arg(combinationToFloat(resultUnit.value(35),resultUnit.value(34)),0,'f',2));
                            // qDebug()<<"位置补偿17:"<<Location_Compensate_17();
                            setLocation_Compensate_18(QString("%1").arg(combinationToFloat(resultUnit.value(37),resultUnit.value(36)),0,'f',2));
                            // qDebug()<<"位置补偿18:"<<Location_Compensate_18();
                            setLocation_Compensate_19(QString("%1").arg(combinationToFloat(resultUnit.value(39),resultUnit.value(38)),0,'f',2));
                            // qDebug()<<"位置补偿19:"<<Location_Compensate_19();
                            setLocation_Compensate_20(QString("%1").arg(combinationToFloat(resultUnit.value(41),resultUnit.value(40)),0,'f',2));
                            // qDebug()<<"位置补偿20:"<<Location_Compensate_20();

                            setSpecialCompensate_DownLimit(QString("%1").arg(combinationToFloat(resultUnit.value(75),resultUnit.value(74)),0,'f',2));
                            // qDebug()<<"摆角专补下限:"<<SpecialCompensate_DownLimit();
                            setSpecialCompensate_UpLimit(QString("%1").arg(combinationToFloat(resultUnit.value(77),resultUnit.value(76)),0,'f',2));
                            // qDebug()<<"摆角专补上限:"<<SpecialCompensate_UpLimit();
                            setSpecialCompensateValue(QString("%1").arg(combinationToFloat(resultUnit.value(79),resultUnit.value(78)),0,'f',2));
                            // qDebug()<<"摆角专补补偿值:"<<SpecialCompensateValue();

                            setAngle45SafeDistance(QString("%1").arg(combinationToFloat(resultUnit.value(95),resultUnit.value(94)),0,'f',2));
                            // qDebug()<<"内摆安全距离:"<<Angle45SafeDistance();

                        }
                    });
        }
    }
}

void ModbusControl::read_Location_Compensate_Window_Coils()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setLeftAngleFeedBack(resultUnit.value(390));
                            // qDebug()<<"左机头角度反馈"<<LeftAngleFeedBack();
                            setRightAngleFeedBack(resultUnit.value(391));
                            // qDebug()<<"右机头角度反馈"<<RightAngleFeedBack();
                            setSpecialCompensate_State(resultUnit.value(421));
                            // qDebug()<<"摆角专补启用:"<<SpecialCompensate_State();
                        }
                    });
        }
    }
}

void ModbusControl::read_AnyLocation_Compensate_Window_Hold()
{
    int Addr1 = 1750;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,120);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setAnyLocation_Compensate_DownLimit_01(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_01(QString("%1").arg(combinationToFloat(resultUnit.value(3),resultUnit.value(2)),0,'f',2));
                            setAnyLocation_Compensate_01(QString("%1").arg(combinationToFloat(resultUnit.value(5),resultUnit.value(4)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_02(QString("%1").arg(combinationToFloat(resultUnit.value(7),resultUnit.value(6)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_02(QString("%1").arg(combinationToFloat(resultUnit.value(9),resultUnit.value(8)),0,'f',2));
                            setAnyLocation_Compensate_02(QString("%1").arg(combinationToFloat(resultUnit.value(11),resultUnit.value(10)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_03(QString("%1").arg(combinationToFloat(resultUnit.value(13),resultUnit.value(12)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_03(QString("%1").arg(combinationToFloat(resultUnit.value(15),resultUnit.value(14)),0,'f',2));
                            setAnyLocation_Compensate_03(QString("%1").arg(combinationToFloat(resultUnit.value(17),resultUnit.value(16)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_04(QString("%1").arg(combinationToFloat(resultUnit.value(19),resultUnit.value(18)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_04(QString("%1").arg(combinationToFloat(resultUnit.value(21),resultUnit.value(20)),0,'f',2));
                            setAnyLocation_Compensate_04(QString("%1").arg(combinationToFloat(resultUnit.value(23),resultUnit.value(22)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_05(QString("%1").arg(combinationToFloat(resultUnit.value(25),resultUnit.value(24)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_05(QString("%1").arg(combinationToFloat(resultUnit.value(27),resultUnit.value(26)),0,'f',2));
                            setAnyLocation_Compensate_05(QString("%1").arg(combinationToFloat(resultUnit.value(29),resultUnit.value(28)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_06(QString("%1").arg(combinationToFloat(resultUnit.value(31),resultUnit.value(30)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_06(QString("%1").arg(combinationToFloat(resultUnit.value(33),resultUnit.value(32)),0,'f',2));
                            setAnyLocation_Compensate_06(QString("%1").arg(combinationToFloat(resultUnit.value(35),resultUnit.value(34)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_07(QString("%1").arg(combinationToFloat(resultUnit.value(37),resultUnit.value(36)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_07(QString("%1").arg(combinationToFloat(resultUnit.value(39),resultUnit.value(38)),0,'f',2));
                            setAnyLocation_Compensate_07(QString("%1").arg(combinationToFloat(resultUnit.value(41),resultUnit.value(40)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_08(QString("%1").arg(combinationToFloat(resultUnit.value(43),resultUnit.value(42)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_08(QString("%1").arg(combinationToFloat(resultUnit.value(45),resultUnit.value(44)),0,'f',2));
                            setAnyLocation_Compensate_08(QString("%1").arg(combinationToFloat(resultUnit.value(47),resultUnit.value(46)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_09(QString("%1").arg(combinationToFloat(resultUnit.value(49),resultUnit.value(48)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_09(QString("%1").arg(combinationToFloat(resultUnit.value(51),resultUnit.value(50)),0,'f',2));
                            setAnyLocation_Compensate_09(QString("%1").arg(combinationToFloat(resultUnit.value(53),resultUnit.value(52)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_10(QString("%1").arg(combinationToFloat(resultUnit.value(55),resultUnit.value(54)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_10(QString("%1").arg(combinationToFloat(resultUnit.value(57),resultUnit.value(56)),0,'f',2));
                            setAnyLocation_Compensate_10(QString("%1").arg(combinationToFloat(resultUnit.value(59),resultUnit.value(58)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_11(QString("%1").arg(combinationToFloat(resultUnit.value(61),resultUnit.value(60)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_11(QString("%1").arg(combinationToFloat(resultUnit.value(63),resultUnit.value(62)),0,'f',2));
                            setAnyLocation_Compensate_11(QString("%1").arg(combinationToFloat(resultUnit.value(65),resultUnit.value(64)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_12(QString("%1").arg(combinationToFloat(resultUnit.value(67),resultUnit.value(66)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_12(QString("%1").arg(combinationToFloat(resultUnit.value(69),resultUnit.value(68)),0,'f',2));
                            setAnyLocation_Compensate_12(QString("%1").arg(combinationToFloat(resultUnit.value(71),resultUnit.value(70)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_13(QString("%1").arg(combinationToFloat(resultUnit.value(73),resultUnit.value(72)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_13(QString("%1").arg(combinationToFloat(resultUnit.value(75),resultUnit.value(74)),0,'f',2));
                            setAnyLocation_Compensate_13(QString("%1").arg(combinationToFloat(resultUnit.value(77),resultUnit.value(76)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_14(QString("%1").arg(combinationToFloat(resultUnit.value(79),resultUnit.value(78)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_14(QString("%1").arg(combinationToFloat(resultUnit.value(81),resultUnit.value(80)),0,'f',2));
                            setAnyLocation_Compensate_14(QString("%1").arg(combinationToFloat(resultUnit.value(83),resultUnit.value(82)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_15(QString("%1").arg(combinationToFloat(resultUnit.value(85),resultUnit.value(84)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_15(QString("%1").arg(combinationToFloat(resultUnit.value(87),resultUnit.value(86)),0,'f',2));
                            setAnyLocation_Compensate_15(QString("%1").arg(combinationToFloat(resultUnit.value(89),resultUnit.value(88)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_16(QString("%1").arg(combinationToFloat(resultUnit.value(91),resultUnit.value(90)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_16(QString("%1").arg(combinationToFloat(resultUnit.value(93),resultUnit.value(92)),0,'f',2));
                            setAnyLocation_Compensate_16(QString("%1").arg(combinationToFloat(resultUnit.value(95),resultUnit.value(94)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_17(QString("%1").arg(combinationToFloat(resultUnit.value(97),resultUnit.value(96)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_17(QString("%1").arg(combinationToFloat(resultUnit.value(99),resultUnit.value(98)),0,'f',2));
                            setAnyLocation_Compensate_17(QString("%1").arg(combinationToFloat(resultUnit.value(101),resultUnit.value(100)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_18(QString("%1").arg(combinationToFloat(resultUnit.value(103),resultUnit.value(102)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_18(QString("%1").arg(combinationToFloat(resultUnit.value(105),resultUnit.value(104)),0,'f',2));
                            setAnyLocation_Compensate_18(QString("%1").arg(combinationToFloat(resultUnit.value(107),resultUnit.value(106)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_19(QString("%1").arg(combinationToFloat(resultUnit.value(109),resultUnit.value(108)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_19(QString("%1").arg(combinationToFloat(resultUnit.value(111),resultUnit.value(110)),0,'f',2));
                            setAnyLocation_Compensate_19(QString("%1").arg(combinationToFloat(resultUnit.value(113),resultUnit.value(112)),0,'f',2));

                            setAnyLocation_Compensate_DownLimit_20(QString("%1").arg(combinationToFloat(resultUnit.value(115),resultUnit.value(114)),0,'f',2));
                            setAnyLocation_Compensate_UpLimit_20(QString("%1").arg(combinationToFloat(resultUnit.value(117),resultUnit.value(116)),0,'f',2));
                            setAnyLocation_Compensate_20(QString("%1").arg(combinationToFloat(resultUnit.value(119),resultUnit.value(118)),0,'f',2));


                        }
                    });
        }
    }
}

void ModbusControl::read_AnyLocation_Compensate_Window_Coils()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setAnyLocation_State01(resultUnit.value(401));
                            // qDebug()<<"任意位置补偿开关1:"<<AnyLocation_State01();
                            setAnyLocation_State02(resultUnit.value(402));
                            // qDebug()<<"任意位置补偿开关2:"<<AnyLocation_State02();
                            setAnyLocation_State03(resultUnit.value(403));
                            // qDebug()<<"任意位置补偿开关3:"<<AnyLocation_State03();
                            setAnyLocation_State04(resultUnit.value(404));
                            // qDebug()<<"任意位置补偿开关4:"<<AnyLocation_State04();
                            setAnyLocation_State05(resultUnit.value(405));
                            // qDebug()<<"任意位置补偿开关5:"<<AnyLocation_State05();
                            setAnyLocation_State06(resultUnit.value(406));
                            // qDebug()<<"任意位置补偿开关6:"<<AnyLocation_State06();
                            setAnyLocation_State07(resultUnit.value(407));
                            // qDebug()<<"任意位置补偿开关7:"<<AnyLocation_State07();
                            setAnyLocation_State08(resultUnit.value(408));
                            // qDebug()<<"任意位置补偿开关8:"<<AnyLocation_State08();
                            setAnyLocation_State09(resultUnit.value(409));
                            // qDebug()<<"任意位置补偿开关9:"<<AnyLocation_State09();
                            setAnyLocation_State10(resultUnit.value(410));
                            // qDebug()<<"任意位置补偿开关10:"<<AnyLocation_State10();
                            setAnyLocation_State11(resultUnit.value(411));
                            // qDebug()<<"任意位置补偿开关11:"<<AnyLocation_State11();
                            setAnyLocation_State12(resultUnit.value(412));
                            // qDebug()<<"任意位置补偿开关12:"<<AnyLocation_State12();
                            setAnyLocation_State13(resultUnit.value(413));
                            // qDebug()<<"任意位置补偿开关13:"<<AnyLocation_State13();
                            setAnyLocation_State14(resultUnit.value(414));
                            // qDebug()<<"任意位置补偿开关14:"<<AnyLocation_State14();
                            setAnyLocation_State15(resultUnit.value(415));
                            // qDebug()<<"任意位置补偿开关15:"<<AnyLocation_State15();
                            setAnyLocation_State16(resultUnit.value(416));
                            // qDebug()<<"任意位置补偿开关16:"<<AnyLocation_State16();
                            setAnyLocation_State17(resultUnit.value(417));
                            // qDebug()<<"任意位置补偿开关17:"<<AnyLocation_State17();
                            setAnyLocation_State18(resultUnit.value(418));
                            // qDebug()<<"任意位置补偿开关18:"<<AnyLocation_State18();
                            setAnyLocation_State19(resultUnit.value(419));
                            // qDebug()<<"任意位置补偿开关19:"<<AnyLocation_State19();
                            setAnyLocation_State20(resultUnit.value(420));
                            // qDebug()<<"任意位置补偿开关20:"<<AnyLocation_State20();
                        }
                    });
        }
    }
}

void ModbusControl::AutoPrinterFunction()
{
    int Addr1 = 0;

    QModbusDataUnit readUnit1(QModbusDataUnit::Coils,Addr1,600);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setLeftAngleFeedBack(resultUnit.value(390));
                            setRightAngleFeedBack(resultUnit.value(391));
                            setMechineChangeAngleMode(resultUnit.value(394));

                        }
                    });
        }
    }


    int Addr2 = 64;

    QModbusDataUnit readUnit2(QModbusDataUnit::HoldingRegisters,Addr2,2);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit2,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
                    {
                        if(reply->error() == QModbusDevice::NoError)
                        {
                            const QModbusDataUnit resultUnit = reply->result();

                            setWait_Worked_MaterialLength(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0)),0,'f',2));
                            // qDebug()<<"111 : "<<Wait_Worked_MaterialLength();
                        }
                    });
        }
    }

    int Addr3 = 214;

    QModbusDataUnit readUnit3(QModbusDataUnit::HoldingRegisters,Addr3,2);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit3,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
            {
                if(reply->error() == QModbusDevice::NoError)
                {
                    const QModbusDataUnit resultUnit = reply->result();

                    setMaterialHeightValue(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0)),0,'f',2));

                    if(MechineChangeAngleMode())
                    {
                        qDebug()<<"无须料高";
                        emit printer_Active_Sig(LeftAngleFeedBack(),RightAngleFeedBack(),Wait_Worked_MaterialLength(),"");
                    }
                    else
                    {
                        qDebug()<<"料高:"<<MaterialHeightValue();
                        emit printer_Active_Sig(LeftAngleFeedBack(),RightAngleFeedBack(),Wait_Worked_MaterialLength(),MaterialHeightValue());
                    }

                }
            });
        }
    }


}

void ModbusControl::read_CustomNumber_And_OrderNumber()
{
    int Addr1 = 360;

    QModbusDataUnit readUnit1(QModbusDataUnit::HoldingRegisters,Addr1,20);

    if(auto* reply = (m_Modbus->sendReadRequest(readUnit1,1))){
        if(!reply->isFinished())
        {
            connect(reply,&QModbusReply::finished,this,[reply, this]()
            {
                if(reply->error() == QModbusDevice::NoError)
                {
                    const QModbusDataUnit resultUnit = reply->result();

                    // setMaterialHeightValue(QString("%1").arg(combinationToFloat(resultUnit.value(1),resultUnit.value(0)),0,'f',2));
                    setPLC_Customer_Number(QString("%1").arg(combinationToInt(resultUnit.value(1),resultUnit.value(0))));
                    setPLC_Order_Number(QString("%1").arg(combinationToInt(resultUnit.value(11),resultUnit.value(10))));

                    // qDebug()<<"序列号 : "<<PLC_Order_Number();
                    //qDebug()<<"厂家码 : "<<PLC_Customer_Number();

                    QString test1_16_Up = QString("%1").arg(PLC_Order_Number().toInt()+24, 4, 16, QLatin1Char('0')).toUpper();
                    QString test2_16_Up = QString("%1").arg(PLC_Customer_Number().toInt()+48, 4, 16, QLatin1Char('0')).toUpper();


                    qDebug()<<"序列号 : "<<test1_16_Up;
                    qDebug()<<"厂家码 : "<<test2_16_Up;

                    qDebug()<<"Cpp - 当前输入密码 : " <<Input_Passwd();
                    qDebug()<<"Cpp - 当前输入密码 - 后8 : " <<Input_Passwd().mid(Input_Passwd().length()-8,4);
                    qDebug()<<"Cpp - 当前输入密码 - 后4 : " <<Input_Passwd().mid(Input_Passwd().length()-4,4);

                    if(test1_16_Up == Input_Passwd().mid(Input_Passwd().length()-8,4) && test2_16_Up == Input_Passwd().mid(Input_Passwd().length()-4,4))
                    {
                        qDebug()<<"认证成功，保存密码!!";
                        qDebug()<<"保存密码 : "<<Input_Passwd().mid(0,12);
                        emit save_Passwd_Signal(Input_Passwd().mid(0,12));
                    }
                    else
                    {
                        qDebug()<<"认证失败!!!!";
                    }

                }
            });
        }
    }
}

void ModbusControl::read_PLC_Parameters_Slots()
{

    // 报警 和 警告
    read_Warning_And_Hint_Data();
    // 读取当前位置 和 双锯延时时间
    read_CuurentLocationValue();
    // 获取报警信号
    getWarningSingnal();

    if(QML_CurrentPage() == 1)      // 手动加工界面
    {
        // 读取 手动加工页面 全部参数
        pollTimer->setInterval(300);
        read_ManualProcessWindow_Hold();
        read_ManualProcessWindow_Coils();
        read_ManualProcessWindow_DiscreteInputs();
        calculate_ManualProcessWindow_MaterialLengthMaxAndMin();
    }
    else if(QML_CurrentPage() ==  2)    // 超长加工界面
    {
        // 读取 超长加工界面 全部参数
        pollTimer->setInterval(300);
        read_ExtraLong_ProcessWindow_Hold();
        read_ExtraLong_ProcessWindow_Coils();
        read_ExtraLong_ProcessWindow_DiscreteInputs();
        calculate_ExtraLong_ProcessWindow_MaterialLengthMaxAndMin();
    }
    else if(QML_CurrentPage() ==  3)    // 超短加工界面
    {
        // 读取 超短加工界面 全部参数
        pollTimer->setInterval(300);
        read_ExtraShort_ProcessWindow_Hold();
        read_ExtraShort_ProcessWindow_Coils();
        read_ExtraShort_ProcessWindow_DiscreteInputs();
        calculate_ExtraShort_ProcessWindow_MaterialLengthMaxAndMin();
    }
    else if(QML_CurrentPage() ==  4)    // 角码加工界面
    {
        pollTimer->setInterval(300);
        // 读取 角码加工界面 寄存器
        read_Corner_ProcessWindow_Hold();
        // 读取 角码加工界面 线圈
        read_Corner_ProcessWindow_Coils();
        // 读取 角码加工界面 离散输入
        read_Corner_ProcessWindow_DiscreteInputs();
    }
    else if(QML_CurrentPage() ==  5)    // 本地料单界面
    {
        pollTimer->setInterval(500);
        // 读取 本地排料加工界面 寄存器
        read_Order_Process_Window_Hold();
        // 读取 本地排料加工界面 线圈
        read_Order_Process_Window_Coils();

        calculate_ExtraLong_ProcessWindow_MaterialLengthMaxAndMin();
        calculate_ExtraShort_ProcessWindow_MaterialLengthMaxAndMin();

        // qDebug()<<"超短料长下限:" <<ExtraShort_MaterialLengthMin();
        // qDebug()<<"超长料长上限:" <<ExtraLong_MaterialLengthMax();

    }
    else if(QML_CurrentPage() ==  6)    // 二维码料单界面
    {
        pollTimer->setInterval(500);
        read_QR_Code_Process_Window_Hold();
        read_QR_Code_Process_Window_Coils();
        if(Location_Rely_ListProcess())
        {
            set_List_Process_Window_Location();
        }
    }
    else if(QML_CurrentPage() ==  7)    // 网络料单界面
    {
        read_NetWork_Process_List_Coils();
        read_NetWork_Process_List_DiscreteInputs();
        calculate_ManualProcessWindow_MaterialLengthMaxAndMin();

        // read_QR_Code_Process_Window_Hold();
        // read_QR_Code_Process_Window_Coils();
        // if(Location_Rely_ListProcess())
        // {
        //     set_List_Process_Window_Location();
        // }
    }
    else if(QML_CurrentPage() ==  8)    // 管理界面
    {
        pollTimer->setInterval(500);
        // 读取 管理界面 寄存器
        read_Manager_Setting_Window_Hold();
        // 读取 管理界面 线圈
        read_Manager_Setting_Window_Coils();
        // 读取 管理界面 离散输入
        read_Manager_Setting_Window_DiscreteInput();
    }
    else if(QML_CurrentPage() ==  9)    // IO监控界面
    {
        read_IO_Monitor_Window_DiscreteInputs();
    }
    else if(QML_CurrentPage() ==  10)   // 打印机设置界面
    {
        read_Printer_Setting_Window_Hold();
        read_Printer_Setting_Window_Coils();
    }
    else if(QML_CurrentPage() ==  12)   // 设备参数设置界面
    {
        pollTimer->setInterval(500);
        // 读取 设备参数设置界面 寄存器
        read_Mechine_Parameter_Window_Hold();
        // 读取 设备参数设置界面 线圈
        read_Mechine_Parameter_Window_Coils();
    }
    else if(QML_CurrentPage() ==  13)   // 伺服参数设置界面
    {
        pollTimer->setInterval(500);
        // 读取 伺服参数设置页面 寄存器
        read_Servo_Parameter_Window_Hold();
        // 读取 伺服参数设置页面 线圈
        read_Servo_Parameter_Window_Coils();
    }
    else if(QML_CurrentPage() ==  14)   // 托料架设置界面
    {
        pollTimer->setInterval(500);
        // 读取 托料架设置界面 寄存器
        read_Hold_Setting_Window_Hold();
        // 读取 托料架设置界面 线圈
        read_Hold_Setting_Window_Coils();
        // 读取 托料架设置界面 离散输入
        read_Hold_Setting_Window_DiscreteInputs();
    }
    else if(QML_CurrentPage() ==  15)   // 位置补偿界面
    {
        pollTimer->setInterval(500);

        calculate_ManualProcessWindow_MaterialLengthMaxAndMin();
        // 读取 位置补偿界面 寄存器
        read_Location_Compensate_Window_Hold();
        // 读取 位置补偿界面 线圈
        read_Location_Compensate_Window_Coils();
    }
    else if(QML_CurrentPage() ==  16)   // 任意位置补偿界面
    {
        pollTimer->setInterval(500);
        // 读取 任意位置补偿界面 寄存器
        read_AnyLocation_Compensate_Window_Hold();
        // 读取 任意位置补偿界面 线圈
        read_AnyLocation_Compensate_Window_Coils();
    }
    else if(QML_CurrentPage() ==  17)   // U盘料单界面
    {
        read_NetWork_Process_List_Coils();
        read_NetWork_Process_List_DiscreteInputs();
        // write_Modbus_RTU_Hold_16(1500,"0");
        // write_Modbus_RTU_Hold_16(1501,"0");
        // write_Modbus_RTU_Hold_16(1502,"0");
        // write_Modbus_RTU_Hold_16(1503,"0");
        // write_Modbus_RTU_Hold_16(1504,"0");
        // write_Modbus_RTU_Hold_16(1505,"0");
        // write_Modbus_RTU_Hold_16(1506,"0");
        // write_Modbus_RTU_Hold_16(1507,"0");
        // write_Modbus_RTU_Hold_16(1508,"0");
        // write_Modbus_RTU_Hold_16(1509,"0");
        // write_Modbus_RTU_Hold_16(1510,"0");
        // write_Modbus_RTU_Hold_16(1511,"0");
        // write_Modbus_RTU_Hold_16(1512,"0");
        // write_Modbus_RTU_Hold_16(1513,"0");
        // write_Modbus_RTU_Hold_16(1514,"0");
        // write_Modbus_RTU_Hold_16(1515,"0");
        // write_Modbus_RTU_Hold_16(1516,"0");
        // write_Modbus_RTU_Hold_16(1517,"0");
        // write_Modbus_RTU_Hold_16(1518,"0");
        // write_Modbus_RTU_Hold_16(1519,"0");
        // write_Modbus_RTU_Hold_16(1520,"0");
        // write_Modbus_RTU_Coils(73,"0");
        calculate_ExtraLong_ProcessWindow_MaterialLengthMaxAndMin();
        calculate_ExtraShort_ProcessWindow_MaterialLengthMaxAndMin();
    }

    // qDebug()<<"当前定时器触发间隔:"<<pollTimer->interval();
}

void ModbusControl::on_Scanner_Read_Result_Slots(const QByteArray& result)
{
    write_Modbus_RTU_Coils(428,"1");


    qDebug()<<"读取到的结果:"<<result;

    QList Mid = (result).split(',');

    if(QR_Code_CurrentType() == 1)      //长风离线二维码
    {
        // 长风二维码
        // qDebug()<<"触发 长风二维码 解析";
        // 第 1 行数据
        // 料长
        write_Modbus_RTU_Hold_32(1600,Mid.value(1));
        // 左角度
        if(Mid.value(2) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1640,"0");
        }
        else if(Mid.value(2) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1640,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1640,"0");
        }
        // 右角度
        if(Mid.value(3) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1641,"0");
        }
        else if(Mid.value(3) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1641,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1641,"0");
        }
        // 切割数量
        write_Modbus_RTU_Hold_16(1680,Mid.value(4));
        // 第 2 行数据
        // 料长
        write_Modbus_RTU_Hold_32(1602,Mid.value(5));
        // 左角度
        if(Mid.value(6) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1642,"0");
        }
        else if(Mid.value(6) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1642,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1642,"0");
        }
        // 右角度
        if(Mid.value(7) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1643,"0");
        }
        else if(Mid.value(7) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1643,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1643,"0");
        }
        // 切割数量
        write_Modbus_RTU_Hold_16(1681,Mid.value(8));
        // 第 3 行数据
        // 料长
        write_Modbus_RTU_Hold_32(1604,Mid.value(9));
        // 左角度
        if(Mid.value(10) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1644,"0");
        }
        else if(Mid.value(10) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1644,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1644,"0");
        }
        // 右角度
        if(Mid.value(11) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1645,"0");
        }
        else if(Mid.value(11) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1645,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1645,"0");
        }
        // 切割数量
        write_Modbus_RTU_Hold_16(1682,Mid.value(12));
        // 第 4 行数据
        // 料长
        write_Modbus_RTU_Hold_32(1606,Mid.value(13));
        // 左角度
        if(Mid.value(14) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1646,"0");
        }
        else if(Mid.value(14) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1646,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1646,"0");
        }
        // 右角度
        if(Mid.value(15) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1647,"0");
        }
        else if(Mid.value(15) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1647,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1647,"0");
        }
        // 切割数量
        write_Modbus_RTU_Hold_16(1683,Mid.value(16));
        // 第 5 行数据
        // 料长
        write_Modbus_RTU_Hold_32(1608,Mid.value(17));
        // 左角度
        if(Mid.value(18) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1648,"0");
        }
        else if(Mid.value(18) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1648,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1648,"0");
        }
        // 右角度
        if(Mid.value(19) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1649,"0");
        }
        else if(Mid.value(19) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1649,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1649,"0");
        }
        // 切割数量
        write_Modbus_RTU_Hold_16(1684,Mid.value(20));
        // 第 6 行数据
        // 料长
        write_Modbus_RTU_Hold_32(1610,Mid.value(21));
        // 左角度
        if(Mid.value(22) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1650,"0");
        }
        else if(Mid.value(22) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1650,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1650,"0");
        }
        // 右角度
        if(Mid.value(23) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1651,"0");
        }
        else if(Mid.value(23) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1651,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1651,"0");
        }
        // 切割数量
        write_Modbus_RTU_Hold_16(1685,Mid.value(24));
        // 第 7 行数据
        // 料长
        write_Modbus_RTU_Hold_32(1612,Mid.value(25));
        // 左角度
        if(Mid.value(26) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1652,"0");
        }
        else if(Mid.value(26) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1652,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1652,"0");
        }
        // 右角度
        if(Mid.value(27) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1653,"0");
        }
        else if(Mid.value(27) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1653,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1653,"0");
        }
        // 切割数量
        write_Modbus_RTU_Hold_16(1686,Mid.value(28));
        // 第 8 行数据
        // 料长
        write_Modbus_RTU_Hold_32(1614,Mid.value(29));
        // 左角度
        if(Mid.value(30) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1654,"0");
        }
        else if(Mid.value(30) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1654,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1654,"0");
        }
        // 右角度
        if(Mid.value(31) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1655,"0");
        }
        else if(Mid.value(31) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1655,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1655,"0");
        }
        // 切割数量
        write_Modbus_RTU_Hold_16(1687,Mid.value(32));
        // 第 9 行数据
        // 料长
        write_Modbus_RTU_Hold_32(1616,Mid.value(33));
        // 左角度
        if(Mid.value(34) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1656,"0");
        }
        else if(Mid.value(34) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1656,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1656,"0");
        }
        // 右角度
        if(Mid.value(35) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1657,"0");
        }
        else if(Mid.value(35) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1657,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1657,"0");
        }
        // 切割数量
        write_Modbus_RTU_Hold_16(1688,Mid.value(36));
        // 第 10行数据
        // 料长
        write_Modbus_RTU_Hold_32(1618,Mid.value(37));
        // 左角度
        if(Mid.value(38) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1658,"0");
        }
        else if(Mid.value(38) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1658,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1658,"0");
        }
        // 右角度
        if(Mid.value(39) == "45.0")
        {
            write_Modbus_RTU_Hold_16(1659,"0");
        }
        else if(Mid.value(39) == "90.0")
        {
            write_Modbus_RTU_Hold_16(1659,"1");
        }
        else
        {
            write_Modbus_RTU_Hold_16(1659,"0");
        }
        // 切割数量
        write_Modbus_RTU_Hold_16(1689,Mid.value(40));
    }
    else if(QR_Code_CurrentType() == 2)         //速制离线二维码
    {
        // qDebug()<<"触发 速制二维码 解析";
        if(Mid.length() == 87)
        {
            // qDebug()<<"速制二维码 - 外框";
            // 速制二维码
            // 第 1 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1600,Mid.value(1));
            // 左角度
            if(Mid.value(2) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else if(Mid.value(2) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            // 右角度
            if(Mid.value(3) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else if(Mid.value(3) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1680,Mid.value(4));
            // 第 2 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1602,Mid.value(5));
            // 左角度
            if(Mid.value(6) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else if(Mid.value(6) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            // 右角度
            if(Mid.value(7) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else if(Mid.value(7) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1681,Mid.value(8));
            // 第 3 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1604,Mid.value(9));
            // 左角度
            if(Mid.value(10) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else if(Mid.value(10) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            // 右角度
            if(Mid.value(11) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else if(Mid.value(11) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1682,Mid.value(12));
            // 第 4 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1606,Mid.value(13));
            // 左角度
            if(Mid.value(14) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else if(Mid.value(14) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            // 右角度
            if(Mid.value(15) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else if(Mid.value(15) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1683,Mid.value(16));
            // 第 5 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1608,Mid.value(17));
            // 左角度
            if(Mid.value(18) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else if(Mid.value(18) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            // 右角度
            if(Mid.value(19) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else if(Mid.value(19) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1684,Mid.value(20));
            // 第 6 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1610,Mid.value(21));
            // 左角度
            if(Mid.value(22) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else if(Mid.value(22) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            // 右角度
            if(Mid.value(23) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else if(Mid.value(23) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1685,Mid.value(24));
            // 第 7 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1612,Mid.value(25));
            // 左角度
            if(Mid.value(26) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else if(Mid.value(26) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            // 右角度
            if(Mid.value(27) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else if(Mid.value(27) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1686,Mid.value(28));
            // 第 8 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1614,Mid.value(29));
            // 左角度
            if(Mid.value(30) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else if(Mid.value(30) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            // 右角度
            if(Mid.value(31) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else if(Mid.value(31) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1687,Mid.value(32));
            // 第 9 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1616,Mid.value(33));
            // 左角度
            if(Mid.value(34) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else if(Mid.value(34) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            // 右角度
            if(Mid.value(35) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else if(Mid.value(35) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1688,Mid.value(36));
            // 第 10行数据
            // 料长
            write_Modbus_RTU_Hold_32(1618,Mid.value(37));
            // 左角度
            if(Mid.value(38) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else if(Mid.value(38) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            // 右角度
            if(Mid.value(39) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else if(Mid.value(39) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1689,Mid.value(40));
            // 第 11 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1620,Mid.value(41));
            // 左角度
            if(Mid.value(42) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            else if(Mid.value(42) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1660,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            // 右角度
            if(Mid.value(43) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            else if(Mid.value(43) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1661,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1690,Mid.value(44));
            // 第 12 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1622,Mid.value(45));
            // 左角度
            if(Mid.value(46) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            else if(Mid.value(46) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1662,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            // 右角度
            if(Mid.value(47) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            else if(Mid.value(47) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1663,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1691,Mid.value(48));
            // 第 13 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1624,Mid.value(49));
            // 左角度
            if(Mid.value(50) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            else if(Mid.value(50) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1664,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            // 右角度
            if(Mid.value(51) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            else if(Mid.value(51) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1665,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1692,Mid.value(52));
            // 第 14 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1626,Mid.value(53));
            // 左角度
            if(Mid.value(54) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1666,"0");
            }
            else if(Mid.value(54) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1666,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1666,"0");
            }
            // 右角度
            if(Mid.value(55) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1667,"0");
            }
            else if(Mid.value(55) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1667,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1667,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1693,Mid.value(56));
            // 第 15 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1628,Mid.value(57));
            // 左角度
            if(Mid.value(58) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1668,"0");
            }
            else if(Mid.value(58) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1668,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1668,"0");
            }
            // 右角度
            if(Mid.value(59) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1669,"0");
            }
            else if(Mid.value(59) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1669,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1669,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1694,Mid.value(60));
            // 第 16 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1630,Mid.value(61));
            // 左角度
            if(Mid.value(62) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1670,"0");
            }
            else if(Mid.value(62) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1670,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1670,"0");
            }
            // 右角度
            if(Mid.value(63) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1671,"0");
            }
            else if(Mid.value(63) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1671,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1671,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1695,Mid.value(64));
            // 第 17 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1632,Mid.value(65));
            // 左角度
            if(Mid.value(66) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1672,"0");
            }
            else if(Mid.value(66) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1672,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1672,"0");
            }
            // 右角度
            if(Mid.value(67) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1673,"0");
            }
            else if(Mid.value(67) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1673,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1673,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1696,Mid.value(58));
            // 第 18 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1634,Mid.value(59));
            // 左角度
            if(Mid.value(60) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1674,"0");
            }
            else if(Mid.value(60) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1674,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1674,"0");
            }
            // 右角度
            if(Mid.value(61) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1675,"0");
            }
            else if(Mid.value(61) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1675,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1675,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1697,Mid.value(62));
            // 第 19 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1636,Mid.value(63));
            // 左角度
            if(Mid.value(64) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1676,"0");
            }
            else if(Mid.value(64) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1676,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1676,"0");
            }
            // 右角度
            if(Mid.value(65) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1677,"0");
            }
            else if(Mid.value(65) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1677,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1677,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1698,Mid.value(66));
            // 第 20 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1638,Mid.value(67));
            // 左角度
            if(Mid.value(68) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1678,"0");
            }
            else if(Mid.value(68) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1678,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1678,"0");
            }
            // 右角度
            if(Mid.value(69) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1679,"0");
            }
            else if(Mid.value(69) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1679,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1679,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1699,Mid.value(70));
        }
        else if(Mid.length() == 89)
        {
            // qDebug()<<"速制二维码 - 内扇";        // 第 1 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1600,Mid.value(1));
            // 左角度
            if(Mid.value(2) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else if(Mid.value(2) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            // 右角度
            if(Mid.value(3) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else if(Mid.value(3) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1680,Mid.value(4));
            // 第 2 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1602,Mid.value(5));
            // 左角度
            if(Mid.value(6) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else if(Mid.value(6) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            // 右角度
            if(Mid.value(7) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else if(Mid.value(7) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1681,Mid.value(8));
            // 第 3 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1604,Mid.value(9));
            // 左角度
            if(Mid.value(10) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else if(Mid.value(10) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            // 右角度
            if(Mid.value(11) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else if(Mid.value(11) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1682,Mid.value(12));
            // 第 4 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1606,Mid.value(13));
            // 左角度
            if(Mid.value(14) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else if(Mid.value(14) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            // 右角度
            if(Mid.value(15) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else if(Mid.value(15) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1683,Mid.value(16));
            // 第 5 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1608,Mid.value(17));
            // 左角度
            if(Mid.value(18) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else if(Mid.value(18) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            // 右角度
            if(Mid.value(19) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else if(Mid.value(19) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1684,Mid.value(20));
            // 第 6 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1610,Mid.value(21));
            // 左角度
            if(Mid.value(22) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else if(Mid.value(22) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            // 右角度
            if(Mid.value(23) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else if(Mid.value(23) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1685,Mid.value(24));
            // 第 7 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1612,Mid.value(25));
            // 左角度
            if(Mid.value(26) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else if(Mid.value(26) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            // 右角度
            if(Mid.value(27) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else if(Mid.value(27) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1686,Mid.value(28));
            // 第 8 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1614,Mid.value(29));
            // 左角度
            if(Mid.value(30) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else if(Mid.value(30) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            // 右角度
            if(Mid.value(31) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else if(Mid.value(31) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1687,Mid.value(32));
            // 第 9 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1616,Mid.value(33));
            // 左角度
            if(Mid.value(34) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else if(Mid.value(34) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            // 右角度
            if(Mid.value(35) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else if(Mid.value(35) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1688,Mid.value(36));
            // 第 10行数据
            // 料长
            write_Modbus_RTU_Hold_32(1618,Mid.value(37));
            // 左角度
            if(Mid.value(38) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else if(Mid.value(38) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            // 右角度
            if(Mid.value(39) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else if(Mid.value(39) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1689,Mid.value(40));
            // 第 11 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1620,Mid.value(41));
            // 左角度
            if(Mid.value(42) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            else if(Mid.value(42) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1660,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            // 右角度
            if(Mid.value(43) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            else if(Mid.value(43) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1661,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1690,Mid.value(44));
            // 第 12 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1622,Mid.value(45));
            // 左角度
            if(Mid.value(46) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            else if(Mid.value(46) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1662,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            // 右角度
            if(Mid.value(47) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            else if(Mid.value(47) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1663,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1691,Mid.value(48));
            // 第 13 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1624,Mid.value(49));
            // 左角度
            if(Mid.value(50) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            else if(Mid.value(50) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1664,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            // 右角度
            if(Mid.value(51) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            else if(Mid.value(51) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1665,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1692,Mid.value(52));
            // 第 14 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1626,Mid.value(53));
            // 左角度
            if(Mid.value(54) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1666,"0");
            }
            else if(Mid.value(54) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1666,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1666,"0");
            }
            // 右角度
            if(Mid.value(55) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1667,"0");
            }
            else if(Mid.value(55) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1667,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1667,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1693,Mid.value(56));
            // 第 15 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1628,Mid.value(57));
            // 左角度
            if(Mid.value(58) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1668,"0");
            }
            else if(Mid.value(58) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1668,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1668,"0");
            }
            // 右角度
            if(Mid.value(59) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1669,"0");
            }
            else if(Mid.value(59) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1669,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1669,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1694,Mid.value(60));
            // 第 16 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1630,Mid.value(61));
            // 左角度
            if(Mid.value(62) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1670,"0");
            }
            else if(Mid.value(62) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1670,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1670,"0");
            }
            // 右角度
            if(Mid.value(63) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1671,"0");
            }
            else if(Mid.value(63) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1671,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1671,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1695,Mid.value(64));
            // 第 17 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1632,Mid.value(65));
            // 左角度
            if(Mid.value(66) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1672,"0");
            }
            else if(Mid.value(66) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1672,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1672,"0");
            }
            // 右角度
            if(Mid.value(67) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1673,"0");
            }
            else if(Mid.value(67) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1673,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1673,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1696,Mid.value(58));
            // 第 18 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1634,Mid.value(59));
            // 左角度
            if(Mid.value(60) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1674,"0");
            }
            else if(Mid.value(60) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1674,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1674,"0");
            }
            // 右角度
            if(Mid.value(61) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1675,"0");
            }
            else if(Mid.value(61) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1675,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1675,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1697,Mid.value(62));
            // 第 19 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1636,Mid.value(63));
            // 左角度
            if(Mid.value(64) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1676,"0");
            }
            else if(Mid.value(64) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1676,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1676,"0");
            }
            // 右角度
            if(Mid.value(65) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1677,"0");
            }
            else if(Mid.value(65) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1677,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1677,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1698,Mid.value(66));
            // 第 20 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1638,Mid.value(67));
            // 左角度
            if(Mid.value(68) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1678,"0");
            }
            else if(Mid.value(68) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1678,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1678,"0");
            }
            // 右角度
            if(Mid.value(69) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1679,"0");
            }
            else if(Mid.value(69) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1679,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1679,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1699,Mid.value(70));
        }
        else if(Mid.length() == 63)
        {
            // qDebug()<<"速制二维码 - 类型3";
            // 第 1 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1600,Mid.value(1));
            // 左角度
            if(Mid.value(2) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else if(Mid.value(2) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            // 右角度
            if(Mid.value(3) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else if(Mid.value(3) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1680,Mid.value(4));
            // 第 2 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1602,Mid.value(5));
            // 左角度
            if(Mid.value(6) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else if(Mid.value(6) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            // 右角度
            if(Mid.value(7) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else if(Mid.value(7) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1681,Mid.value(8));
            // 第 3 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1604,Mid.value(9));
            // 左角度
            if(Mid.value(10) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else if(Mid.value(10) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            // 右角度
            if(Mid.value(11) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else if(Mid.value(11) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1682,Mid.value(12));
            // 第 4 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1606,Mid.value(13));
            // 左角度
            if(Mid.value(14) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else if(Mid.value(14) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            // 右角度
            if(Mid.value(15) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else if(Mid.value(15) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1683,Mid.value(16));
            // 第 5 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1608,Mid.value(17));
            // 左角度
            if(Mid.value(18) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else if(Mid.value(18) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            // 右角度
            if(Mid.value(19) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else if(Mid.value(19) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1684,Mid.value(20));
            // 第 6 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1610,Mid.value(21));
            // 左角度
            if(Mid.value(22) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else if(Mid.value(22) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            // 右角度
            if(Mid.value(23) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else if(Mid.value(23) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1685,Mid.value(24));
            // 第 7 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1612,Mid.value(25));
            // 左角度
            if(Mid.value(26) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else if(Mid.value(26) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            // 右角度
            if(Mid.value(27) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else if(Mid.value(27) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1686,Mid.value(28));
            // 第 8 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1614,Mid.value(29));
            // 左角度
            if(Mid.value(30) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else if(Mid.value(30) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            // 右角度
            if(Mid.value(31) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else if(Mid.value(31) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1687,Mid.value(32));
            // 第 9 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1616,Mid.value(33));
            // 左角度
            if(Mid.value(34) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else if(Mid.value(34) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            // 右角度
            if(Mid.value(35) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else if(Mid.value(35) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1688,Mid.value(36));
            // 第 10行数据
            // 料长
            write_Modbus_RTU_Hold_32(1618,Mid.value(37));
            // 左角度
            if(Mid.value(38) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else if(Mid.value(38) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            // 右角度
            if(Mid.value(39) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else if(Mid.value(39) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1689,Mid.value(40));
            // 第 11 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1620,Mid.value(41));
            // 左角度
            if(Mid.value(42) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            else if(Mid.value(42) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1660,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            // 右角度
            if(Mid.value(43) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            else if(Mid.value(43) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1661,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1690,Mid.value(44));
            // 第 12 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1622,Mid.value(45));
            // 左角度
            if(Mid.value(46) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            else if(Mid.value(46) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1662,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            // 右角度
            if(Mid.value(47) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            else if(Mid.value(47) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1663,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1691,Mid.value(48));
            // 第 13 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1624,Mid.value(49));
            // 左角度
            if(Mid.value(50) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            else if(Mid.value(50) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1664,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            // 右角度
            if(Mid.value(51) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            else if(Mid.value(51) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1665,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1692,Mid.value(52));
            // 第 14 行数据
            // 料长
            write_Modbus_RTU_Hold_32(1626,Mid.value(53));
            // 左角度
            if(Mid.value(54) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1666,"0");
            }
            else if(Mid.value(54) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1666,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1666,"0");
            }
            // 右角度
            if(Mid.value(55) == "45.0")
            {
                write_Modbus_RTU_Hold_16(1667,"0");
            }
            else if(Mid.value(55) == "90.0")
            {
                write_Modbus_RTU_Hold_16(1667,"1");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1667,"0");
            }
            // 切割数量
            write_Modbus_RTU_Hold_16(1693,Mid.value(56));

        }
    }
    else if(QR_Code_CurrentType() == 3)         //画门窗离线二维码
    {
        // 创品二维码
        // qDebug()<<"触发 画门窗二维码 解析";
        // qDebug()<<"读取到的结果:"<<*result;
        QList Mid1 = (result).split(';');
        // qDebug()<<"拆分数据第一部分:"<<Mid1.value(1);
        QList Mid2 = Mid1.value(1).split(',');
        // qDebug()<<"数据长度:"<<Mid2.length();
        // qDebug()<<"有效数据组数:"<<Mid2.length()/4;
        int enableCount = Mid2.length()/4;
        switch(enableCount)
        {
        case 1:
        {
            write_Modbus_RTU_Hold_32(1600,Mid2.value(0));
            if(Mid2.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid2.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid2.value(3));

            write_Modbus_RTU_Hold_32(1602,"");
            write_Modbus_RTU_Hold_16(1642,"0");
            write_Modbus_RTU_Hold_16(1643,"0");
            write_Modbus_RTU_Hold_16(1681,"0");
            write_Modbus_RTU_Hold_32(1604,"");
            write_Modbus_RTU_Hold_16(1644,"0");
            write_Modbus_RTU_Hold_16(1645,"0");
            write_Modbus_RTU_Hold_16(1682,"0");
            write_Modbus_RTU_Hold_32(1606,"");
            write_Modbus_RTU_Hold_16(1646,"0");
            write_Modbus_RTU_Hold_16(1647,"0");
            write_Modbus_RTU_Hold_16(1683,"0");
            write_Modbus_RTU_Hold_32(1608,"");
            write_Modbus_RTU_Hold_16(1648,"0");
            write_Modbus_RTU_Hold_16(1649,"0");
            write_Modbus_RTU_Hold_16(1684,"0");
            write_Modbus_RTU_Hold_32(1608,"");
            write_Modbus_RTU_Hold_16(1648,"0");
            write_Modbus_RTU_Hold_16(1649,"0");
            write_Modbus_RTU_Hold_16(1684,"0");
            write_Modbus_RTU_Hold_32(1610,"");
            write_Modbus_RTU_Hold_16(1650,"0");
            write_Modbus_RTU_Hold_16(1651,"0");
            write_Modbus_RTU_Hold_16(1685,"0");
            write_Modbus_RTU_Hold_32(1612,"");
            write_Modbus_RTU_Hold_16(1652,"0");
            write_Modbus_RTU_Hold_16(1653,"0");
            write_Modbus_RTU_Hold_16(1686,"0");
            write_Modbus_RTU_Hold_32(1614,"");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");


            break;
        }
        case 2:
        {

            write_Modbus_RTU_Hold_32(1600,Mid2.value(0));
            if(Mid2.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid2.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid2.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid2.value(4));
            if(Mid2.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid2.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid2.value(7));

            write_Modbus_RTU_Hold_32(1604,"");
            write_Modbus_RTU_Hold_16(1644,"0");
            write_Modbus_RTU_Hold_16(1645,"0");
            write_Modbus_RTU_Hold_16(1682,"0");
            write_Modbus_RTU_Hold_32(1606,"");
            write_Modbus_RTU_Hold_16(1646,"0");
            write_Modbus_RTU_Hold_16(1647,"0");
            write_Modbus_RTU_Hold_16(1683,"0");
            write_Modbus_RTU_Hold_32(1608,"");
            write_Modbus_RTU_Hold_16(1648,"0");
            write_Modbus_RTU_Hold_16(1649,"0");
            write_Modbus_RTU_Hold_16(1684,"0");
            write_Modbus_RTU_Hold_32(1608,"");
            write_Modbus_RTU_Hold_16(1648,"0");
            write_Modbus_RTU_Hold_16(1649,"0");
            write_Modbus_RTU_Hold_16(1684,"0");
            write_Modbus_RTU_Hold_32(1610,"");
            write_Modbus_RTU_Hold_16(1650,"0");
            write_Modbus_RTU_Hold_16(1651,"0");
            write_Modbus_RTU_Hold_16(1685,"0");
            write_Modbus_RTU_Hold_32(1612,"");
            write_Modbus_RTU_Hold_16(1652,"0");
            write_Modbus_RTU_Hold_16(1653,"0");
            write_Modbus_RTU_Hold_16(1686,"0");
            write_Modbus_RTU_Hold_32(1614,"");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            break;
        }
        case 3:
        {

            write_Modbus_RTU_Hold_32(1600,Mid2.value(0));
            if(Mid2.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid2.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid2.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid2.value(4));
            if(Mid2.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid2.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid2.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid2.value(8));
            if(Mid2.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid2.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid2.value(11));

            write_Modbus_RTU_Hold_32(1606,"");
            write_Modbus_RTU_Hold_16(1646,"0");
            write_Modbus_RTU_Hold_16(1647,"0");
            write_Modbus_RTU_Hold_16(1683,"0");
            write_Modbus_RTU_Hold_32(1608,"");
            write_Modbus_RTU_Hold_16(1648,"0");
            write_Modbus_RTU_Hold_16(1649,"0");
            write_Modbus_RTU_Hold_16(1684,"0");
            write_Modbus_RTU_Hold_32(1608,"");
            write_Modbus_RTU_Hold_16(1648,"0");
            write_Modbus_RTU_Hold_16(1649,"0");
            write_Modbus_RTU_Hold_16(1684,"0");
            write_Modbus_RTU_Hold_32(1610,"");
            write_Modbus_RTU_Hold_16(1650,"0");
            write_Modbus_RTU_Hold_16(1651,"0");
            write_Modbus_RTU_Hold_16(1685,"0");
            write_Modbus_RTU_Hold_32(1612,"");
            write_Modbus_RTU_Hold_16(1652,"0");
            write_Modbus_RTU_Hold_16(1653,"0");
            write_Modbus_RTU_Hold_16(1686,"0");
            write_Modbus_RTU_Hold_32(1614,"");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");


            break;
        }
        case 4:
        {

            write_Modbus_RTU_Hold_32(1600,Mid2.value(0));
            if(Mid2.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid2.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid2.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid2.value(4));
            if(Mid2.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid2.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid2.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid2.value(8));
            if(Mid2.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid2.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid2.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid2.value(12));
            if(Mid2.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid2.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid2.value(15));

            write_Modbus_RTU_Hold_32(1608,"");
            write_Modbus_RTU_Hold_16(1648,"0");
            write_Modbus_RTU_Hold_16(1649,"0");
            write_Modbus_RTU_Hold_16(1684,"0");
            write_Modbus_RTU_Hold_32(1610,"");
            write_Modbus_RTU_Hold_16(1650,"0");
            write_Modbus_RTU_Hold_16(1651,"0");
            write_Modbus_RTU_Hold_16(1685,"0");
            write_Modbus_RTU_Hold_32(1612,"");
            write_Modbus_RTU_Hold_16(1652,"0");
            write_Modbus_RTU_Hold_16(1653,"0");
            write_Modbus_RTU_Hold_16(1686,"0");
            write_Modbus_RTU_Hold_32(1614,"");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            break;
        }
        case 5:
        {

            write_Modbus_RTU_Hold_32(1600,Mid2.value(0));
            if(Mid2.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid2.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid2.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid2.value(4));
            if(Mid2.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid2.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid2.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid2.value(8));
            if(Mid2.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid2.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid2.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid2.value(12));
            if(Mid2.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid2.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid2.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid2.value(16));
            if(Mid2.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid2.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid2.value(19));

            write_Modbus_RTU_Hold_32(1610,"");
            write_Modbus_RTU_Hold_16(1650,"0");
            write_Modbus_RTU_Hold_16(1651,"0");
            write_Modbus_RTU_Hold_16(1685,"0");
            write_Modbus_RTU_Hold_32(1612,"");
            write_Modbus_RTU_Hold_16(1652,"0");
            write_Modbus_RTU_Hold_16(1653,"0");
            write_Modbus_RTU_Hold_16(1686,"0");
            write_Modbus_RTU_Hold_32(1614,"");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            break;
        }
        case 6:
        {

            write_Modbus_RTU_Hold_32(1600,Mid2.value(0));
            if(Mid2.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid2.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid2.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid2.value(4));
            if(Mid2.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid2.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid2.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid2.value(8));
            if(Mid2.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid2.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid2.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid2.value(12));
            if(Mid2.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid2.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid2.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid2.value(16));
            if(Mid2.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid2.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid2.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid2.value(20));
            if(Mid2.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid2.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid2.value(23));

            write_Modbus_RTU_Hold_32(1612,"");
            write_Modbus_RTU_Hold_16(1652,"0");
            write_Modbus_RTU_Hold_16(1653,"0");
            write_Modbus_RTU_Hold_16(1686,"0");
            write_Modbus_RTU_Hold_32(1614,"");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            break;
        }
        case 7:
        {

            write_Modbus_RTU_Hold_32(1600,Mid2.value(0));
            if(Mid2.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid2.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid2.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid2.value(4));
            if(Mid2.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid2.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid2.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid2.value(8));
            if(Mid2.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid2.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid2.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid2.value(12));
            if(Mid2.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid2.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid2.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid2.value(16));
            if(Mid2.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid2.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid2.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid2.value(20));
            if(Mid2.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid2.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid2.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid2.value(24));
            if(Mid2.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid2.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid2.value(27));

            write_Modbus_RTU_Hold_32(1614,"");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");


            break;

        }
        case 8:
        {

            write_Modbus_RTU_Hold_32(1600,Mid2.value(0));
            if(Mid2.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid2.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid2.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid2.value(4));
            if(Mid2.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid2.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid2.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid2.value(8));
            if(Mid2.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid2.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid2.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid2.value(12));
            if(Mid2.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid2.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid2.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid2.value(16));
            if(Mid2.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid2.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid2.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid2.value(20));
            if(Mid2.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid2.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid2.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid2.value(24));
            if(Mid2.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid2.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid2.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid2.value(28));
            if(Mid2.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid2.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid2.value(31));

            write_Modbus_RTU_Hold_32(1616,"");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            break;
        }
        case 9:
        {

            write_Modbus_RTU_Hold_32(1600,Mid2.value(0));
            if(Mid2.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid2.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid2.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid2.value(4));
            if(Mid2.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid2.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid2.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid2.value(8));
            if(Mid2.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid2.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid2.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid2.value(12));
            if(Mid2.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid2.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid2.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid2.value(16));
            if(Mid2.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid2.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid2.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid2.value(20));
            if(Mid2.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid2.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid2.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid2.value(24));
            if(Mid2.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid2.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid2.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid2.value(28));
            if(Mid2.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid2.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid2.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid2.value(32));
            if(Mid2.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid2.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid2.value(35));


            write_Modbus_RTU_Hold_32(1616,"");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");


            break;
        }
        case 10:
        {

            write_Modbus_RTU_Hold_32(1600,Mid2.value(0));
            if(Mid2.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid2.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid2.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid2.value(4));
            if(Mid2.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid2.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid2.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid2.value(8));
            if(Mid2.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid2.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid2.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid2.value(12));
            if(Mid2.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid2.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid2.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid2.value(16));
            if(Mid2.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid2.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid2.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid2.value(20));
            if(Mid2.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid2.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid2.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid2.value(24));
            if(Mid2.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid2.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid2.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid2.value(28));
            if(Mid2.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid2.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid2.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid2.value(32));
            if(Mid2.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid2.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid2.value(35));

            write_Modbus_RTU_Hold_32(1618,Mid2.value(36));
            if(Mid2.value(37) == "45")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            if(Mid2.value(38) == "45")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            write_Modbus_RTU_Hold_16(1689,Mid2.value(39));

            break;
        }
        default:
        {
            qDebug()<<"其他数据!!!画门窗二维码";
            break;
        }


        }
    }
    else if(QR_Code_CurrentType() == 4)         //创品离线二维码
    {
        // 创品二维码
        // qDebug()<<"触发 创品二维码 解析";
        // qDebug()<<"读取到的结果:"<<*result;
        // qDebug()<<"数据长度:"<<Mid.length();
        // qDebug()<<"有效数据长度:"<<Mid.length() / 2;

        int enableCount = Mid.length() / 2;

        switch(enableCount)
        {
        case 1:
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            write_Modbus_RTU_Hold_16(1680,Mid.value(1));
            write_Modbus_RTU_Hold_32(1602,"0");
            write_Modbus_RTU_Hold_16(1681,"0");
            write_Modbus_RTU_Hold_32(1604,"0");
            write_Modbus_RTU_Hold_16(1682,"0");
            write_Modbus_RTU_Hold_32(1606,"0");
            write_Modbus_RTU_Hold_16(1683,"0");
            write_Modbus_RTU_Hold_32(1608,"0");
            write_Modbus_RTU_Hold_16(1684,"0");
            write_Modbus_RTU_Hold_32(1610,"0");
            write_Modbus_RTU_Hold_16(1685,"0");
            write_Modbus_RTU_Hold_32(1612,"0");
            write_Modbus_RTU_Hold_16(1686,"0");
            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            break;
        case 2:
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            write_Modbus_RTU_Hold_16(1680,Mid.value(1));
            write_Modbus_RTU_Hold_32(1602,Mid.value(2));
            write_Modbus_RTU_Hold_16(1681,Mid.value(3));
            write_Modbus_RTU_Hold_32(1604,"0");
            write_Modbus_RTU_Hold_16(1682,"0");
            write_Modbus_RTU_Hold_32(1606,"0");
            write_Modbus_RTU_Hold_16(1683,"0");
            write_Modbus_RTU_Hold_32(1608,"0");
            write_Modbus_RTU_Hold_16(1684,"0");
            write_Modbus_RTU_Hold_32(1610,"0");
            write_Modbus_RTU_Hold_16(1685,"0");
            write_Modbus_RTU_Hold_32(1612,"0");
            write_Modbus_RTU_Hold_16(1686,"0");
            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1689,"0");
            break;
        case 3:
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            write_Modbus_RTU_Hold_16(1680,Mid.value(1));
            write_Modbus_RTU_Hold_32(1602,Mid.value(2));
            write_Modbus_RTU_Hold_16(1681,Mid.value(3));
            write_Modbus_RTU_Hold_32(1604,Mid.value(4));
            write_Modbus_RTU_Hold_16(1682,Mid.value(5));
            write_Modbus_RTU_Hold_32(1606,"0");
            write_Modbus_RTU_Hold_16(1683,"0");
            write_Modbus_RTU_Hold_32(1608,"0");
            write_Modbus_RTU_Hold_16(1684,"0");
            write_Modbus_RTU_Hold_32(1610,"0");
            write_Modbus_RTU_Hold_16(1685,"0");
            write_Modbus_RTU_Hold_32(1612,"0");
            write_Modbus_RTU_Hold_16(1686,"0");
            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1689,"0");
            break;
        case 4:
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            write_Modbus_RTU_Hold_16(1680,Mid.value(1));
            write_Modbus_RTU_Hold_32(1602,Mid.value(2));
            write_Modbus_RTU_Hold_16(1681,Mid.value(3));
            write_Modbus_RTU_Hold_32(1604,Mid.value(4));
            write_Modbus_RTU_Hold_16(1682,Mid.value(5));
            write_Modbus_RTU_Hold_32(1606,Mid.value(6));
            write_Modbus_RTU_Hold_16(1683,Mid.value(7));
            write_Modbus_RTU_Hold_32(1608,"0");
            write_Modbus_RTU_Hold_16(1684,"0");
            write_Modbus_RTU_Hold_32(1610,"0");
            write_Modbus_RTU_Hold_16(1685,"0");
            write_Modbus_RTU_Hold_32(1612,"0");
            write_Modbus_RTU_Hold_16(1686,"0");
            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1689,"0");
            break;
        case 5:
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            write_Modbus_RTU_Hold_16(1680,Mid.value(1));
            write_Modbus_RTU_Hold_32(1602,Mid.value(2));
            write_Modbus_RTU_Hold_16(1681,Mid.value(3));
            write_Modbus_RTU_Hold_32(1604,Mid.value(4));
            write_Modbus_RTU_Hold_16(1682,Mid.value(5));
            write_Modbus_RTU_Hold_32(1606,Mid.value(6));
            write_Modbus_RTU_Hold_16(1683,Mid.value(7));
            write_Modbus_RTU_Hold_32(1608,Mid.value(8));
            write_Modbus_RTU_Hold_16(1684,Mid.value(9));
            write_Modbus_RTU_Hold_32(1610,"0");
            write_Modbus_RTU_Hold_16(1685,"0");
            write_Modbus_RTU_Hold_32(1612,"0");
            write_Modbus_RTU_Hold_16(1686,"0");
            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1689,"0");
            break;
        case 6:
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            write_Modbus_RTU_Hold_16(1680,Mid.value(1));
            write_Modbus_RTU_Hold_32(1602,Mid.value(2));
            write_Modbus_RTU_Hold_16(1681,Mid.value(3));
            write_Modbus_RTU_Hold_32(1604,Mid.value(4));
            write_Modbus_RTU_Hold_16(1682,Mid.value(5));
            write_Modbus_RTU_Hold_32(1606,Mid.value(6));
            write_Modbus_RTU_Hold_16(1683,Mid.value(7));
            write_Modbus_RTU_Hold_32(1608,Mid.value(8));
            write_Modbus_RTU_Hold_16(1684,Mid.value(9));
            write_Modbus_RTU_Hold_32(1610,Mid.value(10));
            write_Modbus_RTU_Hold_16(1685,Mid.value(11));
            write_Modbus_RTU_Hold_32(1612,"0");
            write_Modbus_RTU_Hold_16(1686,"0");
            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1689,"0");
            break;
        case 7:
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            write_Modbus_RTU_Hold_16(1680,Mid.value(1));
            write_Modbus_RTU_Hold_32(1602,Mid.value(2));
            write_Modbus_RTU_Hold_16(1681,Mid.value(3));
            write_Modbus_RTU_Hold_32(1604,Mid.value(4));
            write_Modbus_RTU_Hold_16(1682,Mid.value(5));
            write_Modbus_RTU_Hold_32(1606,Mid.value(6));
            write_Modbus_RTU_Hold_16(1683,Mid.value(7));
            write_Modbus_RTU_Hold_32(1608,Mid.value(8));
            write_Modbus_RTU_Hold_16(1684,Mid.value(9));
            write_Modbus_RTU_Hold_32(1610,Mid.value(10));
            write_Modbus_RTU_Hold_16(1685,Mid.value(11));
            write_Modbus_RTU_Hold_32(1612,Mid.value(12));
            write_Modbus_RTU_Hold_16(1686,Mid.value(13));
            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1687,"0");
            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1689,"0");
            break;
        case 8:
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            write_Modbus_RTU_Hold_16(1680,Mid.value(1));
            write_Modbus_RTU_Hold_32(1602,Mid.value(2));
            write_Modbus_RTU_Hold_16(1681,Mid.value(3));
            write_Modbus_RTU_Hold_32(1604,Mid.value(4));
            write_Modbus_RTU_Hold_16(1682,Mid.value(5));
            write_Modbus_RTU_Hold_32(1606,Mid.value(6));
            write_Modbus_RTU_Hold_16(1683,Mid.value(7));
            write_Modbus_RTU_Hold_32(1608,Mid.value(8));
            write_Modbus_RTU_Hold_16(1684,Mid.value(9));
            write_Modbus_RTU_Hold_32(1610,Mid.value(10));
            write_Modbus_RTU_Hold_16(1685,Mid.value(11));
            write_Modbus_RTU_Hold_32(1612,Mid.value(12));
            write_Modbus_RTU_Hold_16(1686,Mid.value(13));
            write_Modbus_RTU_Hold_32(1614,Mid.value(14));
            write_Modbus_RTU_Hold_16(1687,Mid.value(15));
            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1688,"0");
            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1689,"0");
            break;
        case 9:
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            write_Modbus_RTU_Hold_16(1680,Mid.value(1));
            write_Modbus_RTU_Hold_32(1602,Mid.value(2));
            write_Modbus_RTU_Hold_16(1681,Mid.value(3));
            write_Modbus_RTU_Hold_32(1604,Mid.value(4));
            write_Modbus_RTU_Hold_16(1682,Mid.value(5));
            write_Modbus_RTU_Hold_32(1606,Mid.value(6));
            write_Modbus_RTU_Hold_16(1683,Mid.value(7));
            write_Modbus_RTU_Hold_32(1608,Mid.value(8));
            write_Modbus_RTU_Hold_16(1684,Mid.value(9));
            write_Modbus_RTU_Hold_32(1610,Mid.value(10));
            write_Modbus_RTU_Hold_16(1685,Mid.value(11));
            write_Modbus_RTU_Hold_32(1612,Mid.value(12));
            write_Modbus_RTU_Hold_16(1686,Mid.value(13));
            write_Modbus_RTU_Hold_32(1614,Mid.value(14));
            write_Modbus_RTU_Hold_16(1687,Mid.value(15));
            write_Modbus_RTU_Hold_32(1616,Mid.value(16));
            write_Modbus_RTU_Hold_16(1688,Mid.value(17));
            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1689,"0");
            break;
        case 10:
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            write_Modbus_RTU_Hold_16(1680,Mid.value(1));
            write_Modbus_RTU_Hold_32(1602,Mid.value(2));
            write_Modbus_RTU_Hold_16(1681,Mid.value(3));
            write_Modbus_RTU_Hold_32(1604,Mid.value(4));
            write_Modbus_RTU_Hold_16(1682,Mid.value(5));
            write_Modbus_RTU_Hold_32(1606,Mid.value(6));
            write_Modbus_RTU_Hold_16(1683,Mid.value(7));
            write_Modbus_RTU_Hold_32(1608,Mid.value(8));
            write_Modbus_RTU_Hold_16(1684,Mid.value(9));
            write_Modbus_RTU_Hold_32(1610,Mid.value(10));
            write_Modbus_RTU_Hold_16(1685,Mid.value(11));
            write_Modbus_RTU_Hold_32(1612,Mid.value(12));
            write_Modbus_RTU_Hold_16(1686,Mid.value(13));
            write_Modbus_RTU_Hold_32(1614,Mid.value(14));
            write_Modbus_RTU_Hold_16(1687,Mid.value(15));
            write_Modbus_RTU_Hold_32(1616,Mid.value(16));
            write_Modbus_RTU_Hold_16(1688,Mid.value(17));
            write_Modbus_RTU_Hold_32(1618,Mid.value(18));
            write_Modbus_RTU_Hold_16(1689,Mid.value(19));
            break;
        default:
            qDebug()<<"其他情况!!!创品二维码";
            break;
        }

    }
    else if(QR_Code_CurrentType() == 5)         //新格尔离线二维码
    {
        qDebug()<<"解析 新格尔离线料单";
        qDebug()<<"读取到的结果:"<<*result;
        qDebug()<<"数据长度:"<<Mid.length();
        qDebug()<<"有效数据长度:"<<Mid.length() / 4;
        int enableCount = Mid.length() / 4;

        switch(enableCount)
        {
        case 1:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,"0");
            write_Modbus_RTU_Hold_16(1642,"0");
            write_Modbus_RTU_Hold_16(1643,"0");
            write_Modbus_RTU_Hold_16(1681,"0");

            write_Modbus_RTU_Hold_32(1604,"0");
            write_Modbus_RTU_Hold_16(1644,"0");
            write_Modbus_RTU_Hold_16(1645,"0");
            write_Modbus_RTU_Hold_16(1682,"0");

            write_Modbus_RTU_Hold_32(1606,"0");
            write_Modbus_RTU_Hold_16(1646,"0");
            write_Modbus_RTU_Hold_16(1647,"0");
            write_Modbus_RTU_Hold_16(1683,"0");

            write_Modbus_RTU_Hold_32(1608,"0");
            write_Modbus_RTU_Hold_16(1648,"0");
            write_Modbus_RTU_Hold_16(1649,"0");
            write_Modbus_RTU_Hold_16(1684,"0");

            write_Modbus_RTU_Hold_32(1610,"0");
            write_Modbus_RTU_Hold_16(1650,"0");
            write_Modbus_RTU_Hold_16(1651,"0");
            write_Modbus_RTU_Hold_16(1685,"0");

            write_Modbus_RTU_Hold_32(1612,"0");
            write_Modbus_RTU_Hold_16(1652,"0");
            write_Modbus_RTU_Hold_16(1653,"0");
            write_Modbus_RTU_Hold_16(1686,"0");

            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");

            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");

            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            write_Modbus_RTU_Hold_32(1620,"0");
            write_Modbus_RTU_Hold_16(1660,"0");
            write_Modbus_RTU_Hold_16(1661,"0");
            write_Modbus_RTU_Hold_16(1690,"0");

            write_Modbus_RTU_Hold_32(1622,"0");
            write_Modbus_RTU_Hold_16(1662,"0");
            write_Modbus_RTU_Hold_16(1663,"0");
            write_Modbus_RTU_Hold_16(1691,"0");

            write_Modbus_RTU_Hold_32(1624,"0");
            write_Modbus_RTU_Hold_16(1664,"0");
            write_Modbus_RTU_Hold_16(1665,"0");
            write_Modbus_RTU_Hold_16(1692,"0");

            write_Modbus_RTU_Hold_32(1626,"0");
            write_Modbus_RTU_Hold_16(1666,"0");
            write_Modbus_RTU_Hold_16(1667,"0");
            write_Modbus_RTU_Hold_16(1693,"0");

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 2:
        {

            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,"0");
            write_Modbus_RTU_Hold_16(1644,"0");
            write_Modbus_RTU_Hold_16(1645,"0");
            write_Modbus_RTU_Hold_16(1682,"0");

            write_Modbus_RTU_Hold_32(1606,"0");
            write_Modbus_RTU_Hold_16(1646,"0");
            write_Modbus_RTU_Hold_16(1647,"0");
            write_Modbus_RTU_Hold_16(1683,"0");

            write_Modbus_RTU_Hold_32(1608,"0");
            write_Modbus_RTU_Hold_16(1648,"0");
            write_Modbus_RTU_Hold_16(1649,"0");
            write_Modbus_RTU_Hold_16(1684,"0");

            write_Modbus_RTU_Hold_32(1610,"0");
            write_Modbus_RTU_Hold_16(1650,"0");
            write_Modbus_RTU_Hold_16(1651,"0");
            write_Modbus_RTU_Hold_16(1685,"0");

            write_Modbus_RTU_Hold_32(1612,"0");
            write_Modbus_RTU_Hold_16(1652,"0");
            write_Modbus_RTU_Hold_16(1653,"0");
            write_Modbus_RTU_Hold_16(1686,"0");

            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");

            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");

            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            write_Modbus_RTU_Hold_32(1620,"0");
            write_Modbus_RTU_Hold_16(1660,"0");
            write_Modbus_RTU_Hold_16(1661,"0");
            write_Modbus_RTU_Hold_16(1690,"0");

            write_Modbus_RTU_Hold_32(1622,"0");
            write_Modbus_RTU_Hold_16(1662,"0");
            write_Modbus_RTU_Hold_16(1663,"0");
            write_Modbus_RTU_Hold_16(1691,"0");

            write_Modbus_RTU_Hold_32(1624,"0");
            write_Modbus_RTU_Hold_16(1664,"0");
            write_Modbus_RTU_Hold_16(1665,"0");
            write_Modbus_RTU_Hold_16(1692,"0");

            write_Modbus_RTU_Hold_32(1626,"0");
            write_Modbus_RTU_Hold_16(1666,"0");
            write_Modbus_RTU_Hold_16(1667,"0");
            write_Modbus_RTU_Hold_16(1693,"0");

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 3:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,"0");
            write_Modbus_RTU_Hold_16(1646,"0");
            write_Modbus_RTU_Hold_16(1647,"0");
            write_Modbus_RTU_Hold_16(1683,"0");

            write_Modbus_RTU_Hold_32(1608,"0");
            write_Modbus_RTU_Hold_16(1648,"0");
            write_Modbus_RTU_Hold_16(1649,"0");
            write_Modbus_RTU_Hold_16(1684,"0");

            write_Modbus_RTU_Hold_32(1610,"0");
            write_Modbus_RTU_Hold_16(1650,"0");
            write_Modbus_RTU_Hold_16(1651,"0");
            write_Modbus_RTU_Hold_16(1685,"0");

            write_Modbus_RTU_Hold_32(1612,"0");
            write_Modbus_RTU_Hold_16(1652,"0");
            write_Modbus_RTU_Hold_16(1653,"0");
            write_Modbus_RTU_Hold_16(1686,"0");

            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");

            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");

            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            write_Modbus_RTU_Hold_32(1620,"0");
            write_Modbus_RTU_Hold_16(1660,"0");
            write_Modbus_RTU_Hold_16(1661,"0");
            write_Modbus_RTU_Hold_16(1690,"0");

            write_Modbus_RTU_Hold_32(1622,"0");
            write_Modbus_RTU_Hold_16(1662,"0");
            write_Modbus_RTU_Hold_16(1663,"0");
            write_Modbus_RTU_Hold_16(1691,"0");

            write_Modbus_RTU_Hold_32(1624,"0");
            write_Modbus_RTU_Hold_16(1664,"0");
            write_Modbus_RTU_Hold_16(1665,"0");
            write_Modbus_RTU_Hold_16(1692,"0");

            write_Modbus_RTU_Hold_32(1626,"0");
            write_Modbus_RTU_Hold_16(1666,"0");
            write_Modbus_RTU_Hold_16(1667,"0");
            write_Modbus_RTU_Hold_16(1693,"0");

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 4:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,"0");
            write_Modbus_RTU_Hold_16(1648,"0");
            write_Modbus_RTU_Hold_16(1649,"0");
            write_Modbus_RTU_Hold_16(1684,"0");

            write_Modbus_RTU_Hold_32(1610,"0");
            write_Modbus_RTU_Hold_16(1650,"0");
            write_Modbus_RTU_Hold_16(1651,"0");
            write_Modbus_RTU_Hold_16(1685,"0");

            write_Modbus_RTU_Hold_32(1612,"0");
            write_Modbus_RTU_Hold_16(1652,"0");
            write_Modbus_RTU_Hold_16(1653,"0");
            write_Modbus_RTU_Hold_16(1686,"0");

            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");

            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");

            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            write_Modbus_RTU_Hold_32(1620,"0");
            write_Modbus_RTU_Hold_16(1660,"0");
            write_Modbus_RTU_Hold_16(1661,"0");
            write_Modbus_RTU_Hold_16(1690,"0");

            write_Modbus_RTU_Hold_32(1622,"0");
            write_Modbus_RTU_Hold_16(1662,"0");
            write_Modbus_RTU_Hold_16(1663,"0");
            write_Modbus_RTU_Hold_16(1691,"0");

            write_Modbus_RTU_Hold_32(1624,"0");
            write_Modbus_RTU_Hold_16(1664,"0");
            write_Modbus_RTU_Hold_16(1665,"0");
            write_Modbus_RTU_Hold_16(1692,"0");

            write_Modbus_RTU_Hold_32(1626,"0");
            write_Modbus_RTU_Hold_16(1666,"0");
            write_Modbus_RTU_Hold_16(1667,"0");
            write_Modbus_RTU_Hold_16(1693,"0");

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 5:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,"0");
            write_Modbus_RTU_Hold_16(1650,"0");
            write_Modbus_RTU_Hold_16(1651,"0");
            write_Modbus_RTU_Hold_16(1685,"0");

            write_Modbus_RTU_Hold_32(1612,"0");
            write_Modbus_RTU_Hold_16(1652,"0");
            write_Modbus_RTU_Hold_16(1653,"0");
            write_Modbus_RTU_Hold_16(1686,"0");

            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");

            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");

            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            write_Modbus_RTU_Hold_32(1620,"0");
            write_Modbus_RTU_Hold_16(1660,"0");
            write_Modbus_RTU_Hold_16(1661,"0");
            write_Modbus_RTU_Hold_16(1690,"0");

            write_Modbus_RTU_Hold_32(1622,"0");
            write_Modbus_RTU_Hold_16(1662,"0");
            write_Modbus_RTU_Hold_16(1663,"0");
            write_Modbus_RTU_Hold_16(1691,"0");

            write_Modbus_RTU_Hold_32(1624,"0");
            write_Modbus_RTU_Hold_16(1664,"0");
            write_Modbus_RTU_Hold_16(1665,"0");
            write_Modbus_RTU_Hold_16(1692,"0");

            write_Modbus_RTU_Hold_32(1626,"0");
            write_Modbus_RTU_Hold_16(1666,"0");
            write_Modbus_RTU_Hold_16(1667,"0");
            write_Modbus_RTU_Hold_16(1693,"0");

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 6:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,"0");
            write_Modbus_RTU_Hold_16(1652,"0");
            write_Modbus_RTU_Hold_16(1653,"0");
            write_Modbus_RTU_Hold_16(1686,"0");

            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");

            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");

            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            write_Modbus_RTU_Hold_32(1620,"0");
            write_Modbus_RTU_Hold_16(1660,"0");
            write_Modbus_RTU_Hold_16(1661,"0");
            write_Modbus_RTU_Hold_16(1690,"0");

            write_Modbus_RTU_Hold_32(1622,"0");
            write_Modbus_RTU_Hold_16(1662,"0");
            write_Modbus_RTU_Hold_16(1663,"0");
            write_Modbus_RTU_Hold_16(1691,"0");

            write_Modbus_RTU_Hold_32(1624,"0");
            write_Modbus_RTU_Hold_16(1664,"0");
            write_Modbus_RTU_Hold_16(1665,"0");
            write_Modbus_RTU_Hold_16(1692,"0");

            write_Modbus_RTU_Hold_32(1626,"0");
            write_Modbus_RTU_Hold_16(1666,"0");
            write_Modbus_RTU_Hold_16(1667,"0");
            write_Modbus_RTU_Hold_16(1693,"0");

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 7:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,"0");
            write_Modbus_RTU_Hold_16(1654,"0");
            write_Modbus_RTU_Hold_16(1655,"0");
            write_Modbus_RTU_Hold_16(1687,"0");

            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");

            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            write_Modbus_RTU_Hold_32(1620,"0");
            write_Modbus_RTU_Hold_16(1660,"0");
            write_Modbus_RTU_Hold_16(1661,"0");
            write_Modbus_RTU_Hold_16(1690,"0");

            write_Modbus_RTU_Hold_32(1622,"0");
            write_Modbus_RTU_Hold_16(1662,"0");
            write_Modbus_RTU_Hold_16(1663,"0");
            write_Modbus_RTU_Hold_16(1691,"0");

            write_Modbus_RTU_Hold_32(1624,"0");
            write_Modbus_RTU_Hold_16(1664,"0");
            write_Modbus_RTU_Hold_16(1665,"0");
            write_Modbus_RTU_Hold_16(1692,"0");

            write_Modbus_RTU_Hold_32(1626,"0");
            write_Modbus_RTU_Hold_16(1666,"0");
            write_Modbus_RTU_Hold_16(1667,"0");
            write_Modbus_RTU_Hold_16(1693,"0");

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 8:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid.value(28));
            if(Mid.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid.value(31));

            write_Modbus_RTU_Hold_32(1616,"0");
            write_Modbus_RTU_Hold_16(1656,"0");
            write_Modbus_RTU_Hold_16(1657,"0");
            write_Modbus_RTU_Hold_16(1688,"0");

            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            write_Modbus_RTU_Hold_32(1620,"0");
            write_Modbus_RTU_Hold_16(1660,"0");
            write_Modbus_RTU_Hold_16(1661,"0");
            write_Modbus_RTU_Hold_16(1690,"0");

            write_Modbus_RTU_Hold_32(1622,"0");
            write_Modbus_RTU_Hold_16(1662,"0");
            write_Modbus_RTU_Hold_16(1663,"0");
            write_Modbus_RTU_Hold_16(1691,"0");

            write_Modbus_RTU_Hold_32(1624,"0");
            write_Modbus_RTU_Hold_16(1664,"0");
            write_Modbus_RTU_Hold_16(1665,"0");
            write_Modbus_RTU_Hold_16(1692,"0");

            write_Modbus_RTU_Hold_32(1626,"0");
            write_Modbus_RTU_Hold_16(1666,"0");
            write_Modbus_RTU_Hold_16(1667,"0");
            write_Modbus_RTU_Hold_16(1693,"0");

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 9:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid.value(28));
            if(Mid.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid.value(32));
            if(Mid.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid.value(35));

            write_Modbus_RTU_Hold_32(1618,"0");
            write_Modbus_RTU_Hold_16(1658,"0");
            write_Modbus_RTU_Hold_16(1659,"0");
            write_Modbus_RTU_Hold_16(1689,"0");

            write_Modbus_RTU_Hold_32(1620,"0");
            write_Modbus_RTU_Hold_16(1660,"0");
            write_Modbus_RTU_Hold_16(1661,"0");
            write_Modbus_RTU_Hold_16(1690,"0");

            write_Modbus_RTU_Hold_32(1622,"0");
            write_Modbus_RTU_Hold_16(1662,"0");
            write_Modbus_RTU_Hold_16(1663,"0");
            write_Modbus_RTU_Hold_16(1691,"0");

            write_Modbus_RTU_Hold_32(1624,"0");
            write_Modbus_RTU_Hold_16(1664,"0");
            write_Modbus_RTU_Hold_16(1665,"0");
            write_Modbus_RTU_Hold_16(1692,"0");

            write_Modbus_RTU_Hold_32(1626,"0");
            write_Modbus_RTU_Hold_16(1666,"0");
            write_Modbus_RTU_Hold_16(1667,"0");
            write_Modbus_RTU_Hold_16(1693,"0");

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 10:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid.value(28));
            if(Mid.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid.value(32));
            if(Mid.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid.value(35));

            write_Modbus_RTU_Hold_32(1618,Mid.value(36));
            if(Mid.value(37) == "45")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            if(Mid.value(38) == "45")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            write_Modbus_RTU_Hold_16(1689,Mid.value(39));

            write_Modbus_RTU_Hold_32(1620,"0");
            write_Modbus_RTU_Hold_16(1660,"0");
            write_Modbus_RTU_Hold_16(1661,"0");
            write_Modbus_RTU_Hold_16(1690,"0");

            write_Modbus_RTU_Hold_32(1622,"0");
            write_Modbus_RTU_Hold_16(1662,"0");
            write_Modbus_RTU_Hold_16(1663,"0");
            write_Modbus_RTU_Hold_16(1691,"0");

            write_Modbus_RTU_Hold_32(1624,"0");
            write_Modbus_RTU_Hold_16(1664,"0");
            write_Modbus_RTU_Hold_16(1665,"0");
            write_Modbus_RTU_Hold_16(1692,"0");

            write_Modbus_RTU_Hold_32(1626,"0");
            write_Modbus_RTU_Hold_16(1666,"0");
            write_Modbus_RTU_Hold_16(1667,"0");
            write_Modbus_RTU_Hold_16(1693,"0");

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 11:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid.value(28));
            if(Mid.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid.value(32));
            if(Mid.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid.value(35));

            write_Modbus_RTU_Hold_32(1618,Mid.value(36));
            if(Mid.value(37) == "45")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            if(Mid.value(38) == "45")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            write_Modbus_RTU_Hold_16(1689,Mid.value(39));

            write_Modbus_RTU_Hold_32(1620,Mid.value(40));
            if(Mid.value(41) == "45")
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1660,"1");
            }
            if(Mid.value(42) == "45")
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1661,"1");
            }
            write_Modbus_RTU_Hold_16(1690,Mid.value(43));

            write_Modbus_RTU_Hold_32(1622,"0");
            write_Modbus_RTU_Hold_16(1662,"0");
            write_Modbus_RTU_Hold_16(1663,"0");
            write_Modbus_RTU_Hold_16(1691,"0");

            write_Modbus_RTU_Hold_32(1624,"0");
            write_Modbus_RTU_Hold_16(1664,"0");
            write_Modbus_RTU_Hold_16(1665,"0");
            write_Modbus_RTU_Hold_16(1692,"0");

            write_Modbus_RTU_Hold_32(1626,"0");
            write_Modbus_RTU_Hold_16(1666,"0");
            write_Modbus_RTU_Hold_16(1667,"0");
            write_Modbus_RTU_Hold_16(1693,"0");

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 12:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid.value(28));
            if(Mid.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid.value(32));
            if(Mid.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid.value(35));

            write_Modbus_RTU_Hold_32(1618,Mid.value(36));
            if(Mid.value(37) == "45")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            if(Mid.value(38) == "45")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            write_Modbus_RTU_Hold_16(1689,Mid.value(39));

            write_Modbus_RTU_Hold_32(1620,Mid.value(40));
            if(Mid.value(41) == "45")
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1660,"1");
            }
            if(Mid.value(42) == "45")
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1661,"1");
            }
            write_Modbus_RTU_Hold_16(1690,Mid.value(43));

            write_Modbus_RTU_Hold_32(1622,Mid.value(44));
            if(Mid.value(45) == "45")
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1662,"1");
            }
            if(Mid.value(46) == "45")
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1663,"1");
            }
            write_Modbus_RTU_Hold_16(1691,Mid.value(47));

            write_Modbus_RTU_Hold_32(1624,"0");
            write_Modbus_RTU_Hold_16(1664,"0");
            write_Modbus_RTU_Hold_16(1665,"0");
            write_Modbus_RTU_Hold_16(1692,"0");

            write_Modbus_RTU_Hold_32(1626,"0");
            write_Modbus_RTU_Hold_16(1666,"0");
            write_Modbus_RTU_Hold_16(1667,"0");
            write_Modbus_RTU_Hold_16(1693,"0");

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 13:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid.value(28));
            if(Mid.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid.value(32));
            if(Mid.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid.value(35));

            write_Modbus_RTU_Hold_32(1618,Mid.value(36));
            if(Mid.value(37) == "45")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            if(Mid.value(38) == "45")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            write_Modbus_RTU_Hold_16(1689,Mid.value(39));

            write_Modbus_RTU_Hold_32(1620,Mid.value(40));
            if(Mid.value(41) == "45")
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1660,"1");
            }
            if(Mid.value(42) == "45")
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1661,"1");
            }
            write_Modbus_RTU_Hold_16(1690,Mid.value(43));

            write_Modbus_RTU_Hold_32(1622,Mid.value(44));
            if(Mid.value(45) == "45")
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1662,"1");
            }
            if(Mid.value(46) == "45")
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1663,"1");
            }
            write_Modbus_RTU_Hold_16(1691,Mid.value(47));

            write_Modbus_RTU_Hold_32(1624,Mid.value(48));
            if(Mid.value(49) == "45")
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1664,"1");
            }
            if(Mid.value(50) == "45")
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1665,"1");
            }
            write_Modbus_RTU_Hold_16(1692,Mid.value(51));

            write_Modbus_RTU_Hold_32(1626,"0");
            write_Modbus_RTU_Hold_16(1666,"0");
            write_Modbus_RTU_Hold_16(1667,"0");
            write_Modbus_RTU_Hold_16(1693,"0");

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 14:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid.value(28));
            if(Mid.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid.value(32));
            if(Mid.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid.value(35));

            write_Modbus_RTU_Hold_32(1618,Mid.value(36));
            if(Mid.value(37) == "45")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            if(Mid.value(38) == "45")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            write_Modbus_RTU_Hold_16(1689,Mid.value(39));

            write_Modbus_RTU_Hold_32(1620,Mid.value(40));
            if(Mid.value(41) == "45")
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1660,"1");
            }
            if(Mid.value(42) == "45")
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1661,"1");
            }
            write_Modbus_RTU_Hold_16(1690,Mid.value(43));

            write_Modbus_RTU_Hold_32(1622,Mid.value(44));
            if(Mid.value(45) == "45")
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1662,"1");
            }
            if(Mid.value(46) == "45")
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1663,"1");
            }
            write_Modbus_RTU_Hold_16(1691,Mid.value(47));

            write_Modbus_RTU_Hold_32(1624,Mid.value(48));
            if(Mid.value(49) == "45")
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1664,"1");
            }
            if(Mid.value(50) == "45")
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1665,"1");
            }
            write_Modbus_RTU_Hold_16(1692,Mid.value(51));

            write_Modbus_RTU_Hold_32(1626,Mid.value(52));
            if(Mid.value(53) == "45")
            {
                write_Modbus_RTU_Hold_16(1666,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1666,"1");
            }
            if(Mid.value(54) == "45")
            {
                write_Modbus_RTU_Hold_16(1667,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1667,"1");
            }
            write_Modbus_RTU_Hold_16(1693,Mid.value(55));

            write_Modbus_RTU_Hold_32(1628,"0");
            write_Modbus_RTU_Hold_16(1668,"0");
            write_Modbus_RTU_Hold_16(1669,"0");
            write_Modbus_RTU_Hold_16(1694,"0");

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 15:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid.value(28));
            if(Mid.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid.value(32));
            if(Mid.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid.value(35));

            write_Modbus_RTU_Hold_32(1618,Mid.value(36));
            if(Mid.value(37) == "45")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            if(Mid.value(38) == "45")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            write_Modbus_RTU_Hold_16(1689,Mid.value(39));

            write_Modbus_RTU_Hold_32(1620,Mid.value(40));
            if(Mid.value(41) == "45")
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1660,"1");
            }
            if(Mid.value(42) == "45")
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1661,"1");
            }
            write_Modbus_RTU_Hold_16(1690,Mid.value(43));

            write_Modbus_RTU_Hold_32(1622,Mid.value(44));
            if(Mid.value(45) == "45")
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1662,"1");
            }
            if(Mid.value(46) == "45")
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1663,"1");
            }
            write_Modbus_RTU_Hold_16(1691,Mid.value(47));

            write_Modbus_RTU_Hold_32(1624,Mid.value(48));
            if(Mid.value(49) == "45")
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1664,"1");
            }
            if(Mid.value(50) == "45")
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1665,"1");
            }
            write_Modbus_RTU_Hold_16(1692,Mid.value(51));

            write_Modbus_RTU_Hold_32(1626,Mid.value(52));
            if(Mid.value(53) == "45")
            {
                write_Modbus_RTU_Hold_16(1666,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1666,"1");
            }
            if(Mid.value(54) == "45")
            {
                write_Modbus_RTU_Hold_16(1667,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1667,"1");
            }
            write_Modbus_RTU_Hold_16(1693,Mid.value(55));

            write_Modbus_RTU_Hold_32(1628,Mid.value(56));
            if(Mid.value(57) == "45")
            {
                write_Modbus_RTU_Hold_16(1668,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1668,"1");
            }
            if(Mid.value(58) == "45")
            {
                write_Modbus_RTU_Hold_16(1669,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1669,"1");
            }
            write_Modbus_RTU_Hold_16(1694,Mid.value(59));

            write_Modbus_RTU_Hold_32(1630,"0");
            write_Modbus_RTU_Hold_16(1670,"0");
            write_Modbus_RTU_Hold_16(1671,"0");
            write_Modbus_RTU_Hold_16(1695,"0");

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 16:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid.value(28));
            if(Mid.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid.value(32));
            if(Mid.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid.value(35));

            write_Modbus_RTU_Hold_32(1618,Mid.value(36));
            if(Mid.value(37) == "45")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            if(Mid.value(38) == "45")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            write_Modbus_RTU_Hold_16(1689,Mid.value(39));

            write_Modbus_RTU_Hold_32(1620,Mid.value(40));
            if(Mid.value(41) == "45")
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1660,"1");
            }
            if(Mid.value(42) == "45")
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1661,"1");
            }
            write_Modbus_RTU_Hold_16(1690,Mid.value(43));

            write_Modbus_RTU_Hold_32(1622,Mid.value(44));
            if(Mid.value(45) == "45")
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1662,"1");
            }
            if(Mid.value(46) == "45")
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1663,"1");
            }
            write_Modbus_RTU_Hold_16(1691,Mid.value(47));

            write_Modbus_RTU_Hold_32(1624,Mid.value(48));
            if(Mid.value(49) == "45")
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1664,"1");
            }
            if(Mid.value(50) == "45")
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1665,"1");
            }
            write_Modbus_RTU_Hold_16(1692,Mid.value(51));

            write_Modbus_RTU_Hold_32(1626,Mid.value(52));
            if(Mid.value(53) == "45")
            {
                write_Modbus_RTU_Hold_16(1666,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1666,"1");
            }
            if(Mid.value(54) == "45")
            {
                write_Modbus_RTU_Hold_16(1667,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1667,"1");
            }
            write_Modbus_RTU_Hold_16(1693,Mid.value(55));

            write_Modbus_RTU_Hold_32(1628,Mid.value(56));
            if(Mid.value(57) == "45")
            {
                write_Modbus_RTU_Hold_16(1668,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1668,"1");
            }
            if(Mid.value(58) == "45")
            {
                write_Modbus_RTU_Hold_16(1669,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1669,"1");
            }
            write_Modbus_RTU_Hold_16(1694,Mid.value(59));

            write_Modbus_RTU_Hold_32(1630,Mid.value(60));
            if(Mid.value(61) == "45")
            {
                write_Modbus_RTU_Hold_16(1670,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1670,"1");
            }
            if(Mid.value(62) == "45")
            {
                write_Modbus_RTU_Hold_16(1671,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1671,"1");
            }
            write_Modbus_RTU_Hold_16(1695,Mid.value(63));

            write_Modbus_RTU_Hold_32(1632,"0");
            write_Modbus_RTU_Hold_16(1672,"0");
            write_Modbus_RTU_Hold_16(1673,"0");
            write_Modbus_RTU_Hold_16(1696,"0");

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 17:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid.value(28));
            if(Mid.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid.value(32));
            if(Mid.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid.value(35));

            write_Modbus_RTU_Hold_32(1618,Mid.value(36));
            if(Mid.value(37) == "45")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            if(Mid.value(38) == "45")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            write_Modbus_RTU_Hold_16(1689,Mid.value(39));

            write_Modbus_RTU_Hold_32(1620,Mid.value(40));
            if(Mid.value(41) == "45")
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1660,"1");
            }
            if(Mid.value(42) == "45")
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1661,"1");
            }
            write_Modbus_RTU_Hold_16(1690,Mid.value(43));

            write_Modbus_RTU_Hold_32(1622,Mid.value(44));
            if(Mid.value(45) == "45")
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1662,"1");
            }
            if(Mid.value(46) == "45")
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1663,"1");
            }
            write_Modbus_RTU_Hold_16(1691,Mid.value(47));

            write_Modbus_RTU_Hold_32(1624,Mid.value(48));
            if(Mid.value(49) == "45")
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1664,"1");
            }
            if(Mid.value(50) == "45")
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1665,"1");
            }
            write_Modbus_RTU_Hold_16(1692,Mid.value(51));

            write_Modbus_RTU_Hold_32(1626,Mid.value(52));
            if(Mid.value(53) == "45")
            {
                write_Modbus_RTU_Hold_16(1666,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1666,"1");
            }
            if(Mid.value(54) == "45")
            {
                write_Modbus_RTU_Hold_16(1667,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1667,"1");
            }
            write_Modbus_RTU_Hold_16(1693,Mid.value(55));

            write_Modbus_RTU_Hold_32(1628,Mid.value(56));
            if(Mid.value(57) == "45")
            {
                write_Modbus_RTU_Hold_16(1668,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1668,"1");
            }
            if(Mid.value(58) == "45")
            {
                write_Modbus_RTU_Hold_16(1669,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1669,"1");
            }
            write_Modbus_RTU_Hold_16(1694,Mid.value(59));

            write_Modbus_RTU_Hold_32(1630,Mid.value(60));
            if(Mid.value(61) == "45")
            {
                write_Modbus_RTU_Hold_16(1670,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1670,"1");
            }
            if(Mid.value(62) == "45")
            {
                write_Modbus_RTU_Hold_16(1671,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1671,"1");
            }
            write_Modbus_RTU_Hold_16(1695,Mid.value(63));
            write_Modbus_RTU_Hold_32(1630,Mid.value(60));
            if(Mid.value(61) == "45")
            {
                write_Modbus_RTU_Hold_16(1670,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1670,"1");
            }
            if(Mid.value(62) == "45")
            {
                write_Modbus_RTU_Hold_16(1671,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1671,"1");
            }
            write_Modbus_RTU_Hold_16(1695,Mid.value(63));

            write_Modbus_RTU_Hold_32(1632,Mid.value(64));
            if(Mid.value(65) == "45")
            {
                write_Modbus_RTU_Hold_16(1672,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1672,"1");
            }
            if(Mid.value(66) == "45")
            {
                write_Modbus_RTU_Hold_16(1673,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1673,"1");
            }
            write_Modbus_RTU_Hold_16(1696,Mid.value(67));

            write_Modbus_RTU_Hold_32(1634,"0");
            write_Modbus_RTU_Hold_16(1674,"0");
            write_Modbus_RTU_Hold_16(1675,"0");
            write_Modbus_RTU_Hold_16(1697,"0");

            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 18:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid.value(28));
            if(Mid.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid.value(32));
            if(Mid.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid.value(35));

            write_Modbus_RTU_Hold_32(1618,Mid.value(36));
            if(Mid.value(37) == "45")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            if(Mid.value(38) == "45")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            write_Modbus_RTU_Hold_16(1689,Mid.value(39));

            write_Modbus_RTU_Hold_32(1620,Mid.value(40));
            if(Mid.value(41) == "45")
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1660,"1");
            }
            if(Mid.value(42) == "45")
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1661,"1");
            }
            write_Modbus_RTU_Hold_16(1690,Mid.value(43));

            write_Modbus_RTU_Hold_32(1622,Mid.value(44));
            if(Mid.value(45) == "45")
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1662,"1");
            }
            if(Mid.value(46) == "45")
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1663,"1");
            }
            write_Modbus_RTU_Hold_16(1691,Mid.value(47));

            write_Modbus_RTU_Hold_32(1624,Mid.value(48));
            if(Mid.value(49) == "45")
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1664,"1");
            }
            if(Mid.value(50) == "45")
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1665,"1");
            }
            write_Modbus_RTU_Hold_16(1692,Mid.value(51));

            write_Modbus_RTU_Hold_32(1626,Mid.value(52));
            if(Mid.value(53) == "45")
            {
                write_Modbus_RTU_Hold_16(1666,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1666,"1");
            }
            if(Mid.value(54) == "45")
            {
                write_Modbus_RTU_Hold_16(1667,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1667,"1");
            }
            write_Modbus_RTU_Hold_16(1693,Mid.value(55));

            write_Modbus_RTU_Hold_32(1628,Mid.value(56));
            if(Mid.value(57) == "45")
            {
                write_Modbus_RTU_Hold_16(1668,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1668,"1");
            }
            if(Mid.value(58) == "45")
            {
                write_Modbus_RTU_Hold_16(1669,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1669,"1");
            }
            write_Modbus_RTU_Hold_16(1694,Mid.value(59));

            write_Modbus_RTU_Hold_32(1630,Mid.value(60));
            if(Mid.value(61) == "45")
            {
                write_Modbus_RTU_Hold_16(1670,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1670,"1");
            }
            if(Mid.value(62) == "45")
            {
                write_Modbus_RTU_Hold_16(1671,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1671,"1");
            }
            write_Modbus_RTU_Hold_16(1695,Mid.value(63));
            write_Modbus_RTU_Hold_32(1630,Mid.value(60));
            if(Mid.value(61) == "45")
            {
                write_Modbus_RTU_Hold_16(1670,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1670,"1");
            }
            if(Mid.value(62) == "45")
            {
                write_Modbus_RTU_Hold_16(1671,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1671,"1");
            }
            write_Modbus_RTU_Hold_16(1695,Mid.value(63));

            write_Modbus_RTU_Hold_32(1632,Mid.value(64));
            if(Mid.value(65) == "45")
            {
                write_Modbus_RTU_Hold_16(1672,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1672,"1");
            }
            if(Mid.value(66) == "45")
            {
                write_Modbus_RTU_Hold_16(1673,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1673,"1");
            }
            write_Modbus_RTU_Hold_16(1696,Mid.value(67));

            write_Modbus_RTU_Hold_32(1634,Mid.value(68));
            if(Mid.value(69) == "45")
            {
                write_Modbus_RTU_Hold_16(1674,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1674,"1");
            }
            if(Mid.value(70) == "45")
            {
                write_Modbus_RTU_Hold_16(1675,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1675,"1");
            }
            write_Modbus_RTU_Hold_16(1697,Mid.value(71));


            write_Modbus_RTU_Hold_32(1636,"0");
            write_Modbus_RTU_Hold_16(1676,"0");
            write_Modbus_RTU_Hold_16(1677,"0");
            write_Modbus_RTU_Hold_16(1698,"0");

            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");
            break;
        }
        case 19:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid.value(28));
            if(Mid.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid.value(32));
            if(Mid.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid.value(35));

            write_Modbus_RTU_Hold_32(1618,Mid.value(36));
            if(Mid.value(37) == "45")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            if(Mid.value(38) == "45")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            write_Modbus_RTU_Hold_16(1689,Mid.value(39));

            write_Modbus_RTU_Hold_32(1620,Mid.value(40));
            if(Mid.value(41) == "45")
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1660,"1");
            }
            if(Mid.value(42) == "45")
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1661,"1");
            }
            write_Modbus_RTU_Hold_16(1690,Mid.value(43));

            write_Modbus_RTU_Hold_32(1622,Mid.value(44));
            if(Mid.value(45) == "45")
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1662,"1");
            }
            if(Mid.value(46) == "45")
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1663,"1");
            }
            write_Modbus_RTU_Hold_16(1691,Mid.value(47));

            write_Modbus_RTU_Hold_32(1624,Mid.value(48));
            if(Mid.value(49) == "45")
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1664,"1");
            }
            if(Mid.value(50) == "45")
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1665,"1");
            }
            write_Modbus_RTU_Hold_16(1692,Mid.value(51));

            write_Modbus_RTU_Hold_32(1626,Mid.value(52));
            if(Mid.value(53) == "45")
            {
                write_Modbus_RTU_Hold_16(1666,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1666,"1");
            }
            if(Mid.value(54) == "45")
            {
                write_Modbus_RTU_Hold_16(1667,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1667,"1");
            }
            write_Modbus_RTU_Hold_16(1693,Mid.value(55));

            write_Modbus_RTU_Hold_32(1628,Mid.value(56));
            if(Mid.value(57) == "45")
            {
                write_Modbus_RTU_Hold_16(1668,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1668,"1");
            }
            if(Mid.value(58) == "45")
            {
                write_Modbus_RTU_Hold_16(1669,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1669,"1");
            }
            write_Modbus_RTU_Hold_16(1694,Mid.value(59));

            write_Modbus_RTU_Hold_32(1630,Mid.value(60));
            if(Mid.value(61) == "45")
            {
                write_Modbus_RTU_Hold_16(1670,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1670,"1");
            }
            if(Mid.value(62) == "45")
            {
                write_Modbus_RTU_Hold_16(1671,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1671,"1");
            }
            write_Modbus_RTU_Hold_16(1695,Mid.value(63));
            write_Modbus_RTU_Hold_32(1630,Mid.value(60));
            if(Mid.value(61) == "45")
            {
                write_Modbus_RTU_Hold_16(1670,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1670,"1");
            }
            if(Mid.value(62) == "45")
            {
                write_Modbus_RTU_Hold_16(1671,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1671,"1");
            }
            write_Modbus_RTU_Hold_16(1695,Mid.value(63));

            write_Modbus_RTU_Hold_32(1632,Mid.value(64));
            if(Mid.value(65) == "45")
            {
                write_Modbus_RTU_Hold_16(1672,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1672,"1");
            }
            if(Mid.value(66) == "45")
            {
                write_Modbus_RTU_Hold_16(1673,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1673,"1");
            }
            write_Modbus_RTU_Hold_16(1696,Mid.value(67));

            write_Modbus_RTU_Hold_32(1634,Mid.value(68));
            if(Mid.value(69) == "45")
            {
                write_Modbus_RTU_Hold_16(1674,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1674,"1");
            }
            if(Mid.value(70) == "45")
            {
                write_Modbus_RTU_Hold_16(1675,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1675,"1");
            }
            write_Modbus_RTU_Hold_16(1697,Mid.value(71));

            write_Modbus_RTU_Hold_32(1636,Mid.value(72));
            if(Mid.value(73) == "45")
            {
                write_Modbus_RTU_Hold_16(1676,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1676,"1");
            }
            if(Mid.value(74) == "45")
            {
                write_Modbus_RTU_Hold_16(1677,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1677,"1");
            }
            write_Modbus_RTU_Hold_16(1698,Mid.value(75));


            write_Modbus_RTU_Hold_32(1638,"0");
            write_Modbus_RTU_Hold_16(1678,"0");
            write_Modbus_RTU_Hold_16(1679,"0");
            write_Modbus_RTU_Hold_16(1699,"0");

            break;
        }
        case 20:
        {
            write_Modbus_RTU_Hold_32(1600,Mid.value(0));
            if(Mid.value(1) == "45")
            {
                write_Modbus_RTU_Hold_16(1640,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1640,"1");
            }
            if(Mid.value(2) == "45")
            {
                write_Modbus_RTU_Hold_16(1641,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1641,"1");
            }
            write_Modbus_RTU_Hold_16(1680,Mid.value(3));

            write_Modbus_RTU_Hold_32(1602,Mid.value(4));
            if(Mid.value(5) == "45")
            {
                write_Modbus_RTU_Hold_16(1642,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1642,"1");
            }
            if(Mid.value(6) == "45")
            {
                write_Modbus_RTU_Hold_16(1643,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1643,"1");
            }
            write_Modbus_RTU_Hold_16(1681,Mid.value(7));

            write_Modbus_RTU_Hold_32(1604,Mid.value(8));
            if(Mid.value(9) == "45")
            {
                write_Modbus_RTU_Hold_16(1644,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1644,"1");
            }
            if(Mid.value(10) == "45")
            {
                write_Modbus_RTU_Hold_16(1645,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1645,"1");
            }
            write_Modbus_RTU_Hold_16(1682,Mid.value(11));

            write_Modbus_RTU_Hold_32(1606,Mid.value(12));
            if(Mid.value(13) == "45")
            {
                write_Modbus_RTU_Hold_16(1646,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1646,"1");
            }
            if(Mid.value(14) == "45")
            {
                write_Modbus_RTU_Hold_16(1647,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1647,"1");
            }
            write_Modbus_RTU_Hold_16(1683,Mid.value(15));

            write_Modbus_RTU_Hold_32(1608,Mid.value(16));
            if(Mid.value(17) == "45")
            {
                write_Modbus_RTU_Hold_16(1648,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1648,"1");
            }
            if(Mid.value(18) == "45")
            {
                write_Modbus_RTU_Hold_16(1649,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1649,"1");
            }
            write_Modbus_RTU_Hold_16(1684,Mid.value(19));

            write_Modbus_RTU_Hold_32(1610,Mid.value(20));
            if(Mid.value(21) == "45")
            {
                write_Modbus_RTU_Hold_16(1650,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1650,"1");
            }
            if(Mid.value(22) == "45")
            {
                write_Modbus_RTU_Hold_16(1651,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1651,"1");
            }
            write_Modbus_RTU_Hold_16(1685,Mid.value(23));

            write_Modbus_RTU_Hold_32(1612,Mid.value(24));
            if(Mid.value(25) == "45")
            {
                write_Modbus_RTU_Hold_16(1652,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1652,"1");
            }
            if(Mid.value(26) == "45")
            {
                write_Modbus_RTU_Hold_16(1653,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1653,"1");
            }
            write_Modbus_RTU_Hold_16(1686,Mid.value(27));

            write_Modbus_RTU_Hold_32(1614,Mid.value(28));
            if(Mid.value(29) == "45")
            {
                write_Modbus_RTU_Hold_16(1654,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1654,"1");
            }
            if(Mid.value(30) == "45")
            {
                write_Modbus_RTU_Hold_16(1655,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1655,"1");
            }
            write_Modbus_RTU_Hold_16(1687,Mid.value(31));

            write_Modbus_RTU_Hold_32(1616,Mid.value(32));
            if(Mid.value(33) == "45")
            {
                write_Modbus_RTU_Hold_16(1656,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1656,"1");
            }
            if(Mid.value(34) == "45")
            {
                write_Modbus_RTU_Hold_16(1657,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1657,"1");
            }
            write_Modbus_RTU_Hold_16(1688,Mid.value(35));

            write_Modbus_RTU_Hold_32(1618,Mid.value(36));
            if(Mid.value(37) == "45")
            {
                write_Modbus_RTU_Hold_16(1658,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1658,"1");
            }
            if(Mid.value(38) == "45")
            {
                write_Modbus_RTU_Hold_16(1659,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1659,"1");
            }
            write_Modbus_RTU_Hold_16(1689,Mid.value(39));

            write_Modbus_RTU_Hold_32(1620,Mid.value(40));
            if(Mid.value(41) == "45")
            {
                write_Modbus_RTU_Hold_16(1660,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1660,"1");
            }
            if(Mid.value(42) == "45")
            {
                write_Modbus_RTU_Hold_16(1661,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1661,"1");
            }
            write_Modbus_RTU_Hold_16(1690,Mid.value(43));

            write_Modbus_RTU_Hold_32(1622,Mid.value(44));
            if(Mid.value(45) == "45")
            {
                write_Modbus_RTU_Hold_16(1662,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1662,"1");
            }
            if(Mid.value(46) == "45")
            {
                write_Modbus_RTU_Hold_16(1663,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1663,"1");
            }
            write_Modbus_RTU_Hold_16(1691,Mid.value(47));

            write_Modbus_RTU_Hold_32(1624,Mid.value(48));
            if(Mid.value(49) == "45")
            {
                write_Modbus_RTU_Hold_16(1664,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1664,"1");
            }
            if(Mid.value(50) == "45")
            {
                write_Modbus_RTU_Hold_16(1665,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1665,"1");
            }
            write_Modbus_RTU_Hold_16(1692,Mid.value(51));

            write_Modbus_RTU_Hold_32(1626,Mid.value(52));
            if(Mid.value(53) == "45")
            {
                write_Modbus_RTU_Hold_16(1666,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1666,"1");
            }
            if(Mid.value(54) == "45")
            {
                write_Modbus_RTU_Hold_16(1667,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1667,"1");
            }
            write_Modbus_RTU_Hold_16(1693,Mid.value(55));

            write_Modbus_RTU_Hold_32(1628,Mid.value(56));
            if(Mid.value(57) == "45")
            {
                write_Modbus_RTU_Hold_16(1668,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1668,"1");
            }
            if(Mid.value(58) == "45")
            {
                write_Modbus_RTU_Hold_16(1669,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1669,"1");
            }
            write_Modbus_RTU_Hold_16(1694,Mid.value(59));

            write_Modbus_RTU_Hold_32(1630,Mid.value(60));
            if(Mid.value(61) == "45")
            {
                write_Modbus_RTU_Hold_16(1670,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1670,"1");
            }
            if(Mid.value(62) == "45")
            {
                write_Modbus_RTU_Hold_16(1671,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1671,"1");
            }
            write_Modbus_RTU_Hold_16(1695,Mid.value(63));
            write_Modbus_RTU_Hold_32(1630,Mid.value(60));
            if(Mid.value(61) == "45")
            {
                write_Modbus_RTU_Hold_16(1670,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1670,"1");
            }
            if(Mid.value(62) == "45")
            {
                write_Modbus_RTU_Hold_16(1671,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1671,"1");
            }
            write_Modbus_RTU_Hold_16(1695,Mid.value(63));

            write_Modbus_RTU_Hold_32(1632,Mid.value(64));
            if(Mid.value(65) == "45")
            {
                write_Modbus_RTU_Hold_16(1672,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1672,"1");
            }
            if(Mid.value(66) == "45")
            {
                write_Modbus_RTU_Hold_16(1673,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1673,"1");
            }
            write_Modbus_RTU_Hold_16(1696,Mid.value(67));

            write_Modbus_RTU_Hold_32(1634,Mid.value(68));
            if(Mid.value(69) == "45")
            {
                write_Modbus_RTU_Hold_16(1674,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1674,"1");
            }
            if(Mid.value(70) == "45")
            {
                write_Modbus_RTU_Hold_16(1675,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1675,"1");
            }
            write_Modbus_RTU_Hold_16(1697,Mid.value(71));

            write_Modbus_RTU_Hold_32(1636,Mid.value(72));
            if(Mid.value(73) == "45")
            {
                write_Modbus_RTU_Hold_16(1676,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1676,"1");
            }
            if(Mid.value(74) == "45")
            {
                write_Modbus_RTU_Hold_16(1677,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1677,"1");
            }
            write_Modbus_RTU_Hold_16(1698,Mid.value(75));

            write_Modbus_RTU_Hold_32(1638,Mid.value(76));
            if(Mid.value(77) == "45")
            {
                write_Modbus_RTU_Hold_16(1678,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1678,"1");
            }
            if(Mid.value(78) == "45")
            {
                write_Modbus_RTU_Hold_16(1679,"0");
            }
            else
            {
                write_Modbus_RTU_Hold_16(1679,"1");
            }
            write_Modbus_RTU_Hold_16(1699,Mid.value(79));
            break;
        }
        default:
        {
            break;
        }
        }

    }
    else
    {
        qDebug()<<"无效二维码数据!!";
    }

    write_Modbus_RTU_Coils(428,"0");


}



int ModbusControl::QML_CurrentPage() const
{
    return m_QML_CurrentPage;
}

void ModbusControl::setQML_CurrentPage(int newQML_CurrentPage)
{
    if (m_QML_CurrentPage == newQML_CurrentPage)
        return;
    m_QML_CurrentPage = newQML_CurrentPage;
    emit QML_CurrentPageChanged();
}

QString ModbusControl::MaterialHeightObservedValue() const
{
    return m_MaterialHeightObservedValue;
}

void ModbusControl::setMaterialHeightObservedValue(const QString &newMaterialHeightObservedValue)
{
    if (m_MaterialHeightObservedValue == newMaterialHeightObservedValue)
        return;
    m_MaterialHeightObservedValue = newMaterialHeightObservedValue;
    emit MaterialHeightObservedValueChanged();
}

QString ModbusControl::MaterialLengthValue() const
{
    return m_MaterialLengthValue;
}

void ModbusControl::setMaterialLengthValue(const QString &newMaterialLengthValue)
{
    if (m_MaterialLengthValue == newMaterialLengthValue)
        return;
    m_MaterialLengthValue = newMaterialLengthValue;
    emit MaterialLengthValueChanged();
}

QString ModbusControl::MaterialHeightValue() const
{
    return m_MaterialHeightValue;
}

void ModbusControl::setMaterialHeightValue(const QString &newMaterialHeightValue)
{
    if (m_MaterialHeightValue == newMaterialHeightValue)
        return;
    m_MaterialHeightValue = newMaterialHeightValue;
    emit MaterialHeightValueChanged();
}

QString ModbusControl::SawsMode() const
{
    return m_SawsMode;
}

void ModbusControl::setSawsMode(const QString &newSawsMode)
{
    if (m_SawsMode == newSawsMode)
        return;
    m_SawsMode = newSawsMode;
    emit SawsModeChanged();
}

QString ModbusControl::CutSegments() const
{
    return m_CutSegments;
}

void ModbusControl::setCutSegments(const QString &newCutSegments)
{
    if (m_CutSegments == newCutSegments)
        return;
    m_CutSegments = newCutSegments;
    emit CutSegmentsChanged();
}

QString ModbusControl::CurrentSegments() const
{
    return m_CurrentSegments;
}

void ModbusControl::setCurrentSegments(const QString &newCurrentSegments)
{
    if (m_CurrentSegments == newCurrentSegments)
        return;
    m_CurrentSegments = newCurrentSegments;
    emit CurrentSegmentsChanged();
}

bool ModbusControl::ObservingState() const
{
    return m_ObservingState;
}

void ModbusControl::setObservingState(bool newObservingState)
{
    if (m_ObservingState == newObservingState)
        return;
    m_ObservingState = newObservingState;
    emit ObservingStateChanged();
}

bool ModbusControl::ImpactState() const
{
    return m_ImpactState;
}

void ModbusControl::setImpactState(bool newImpactState)
{
    if (m_ImpactState == newImpactState)
        return;
    m_ImpactState = newImpactState;
    emit ImpactStateChanged();
}

bool ModbusControl::SawsStartState() const
{
    return m_SawsStartState;
}

void ModbusControl::setSawsStartState(bool newSawsStartState)
{
    if (m_SawsStartState == newSawsStartState)
        return;
    m_SawsStartState = newSawsStartState;
    emit SawsStartStateChanged();
}

bool ModbusControl::SawsOutState() const
{
    return m_SawsOutState;
}

void ModbusControl::setSawsOutState(bool newSawsOutState)
{
    if (m_SawsOutState == newSawsOutState)
        return;
    m_SawsOutState = newSawsOutState;
    emit SawsOutStateChanged();
}

bool ModbusControl::IO_X12() const
{
    return m_IO_X12;
}

void ModbusControl::setIO_X12(bool newIO_X12)
{
    if (m_IO_X12 == newIO_X12)
        return;
    m_IO_X12 = newIO_X12;
    emit IO_X12Changed();
}

bool ModbusControl::IO_X13() const
{
    return m_IO_X13;
}

void ModbusControl::setIO_X13(bool newIO_X13)
{
    if (m_IO_X13 == newIO_X13)
        return;
    m_IO_X13 = newIO_X13;
    emit IO_X13Changed();
}

bool ModbusControl::IO_X14() const
{
    return m_IO_X14;
}

void ModbusControl::setIO_X14(bool newIO_X14)
{
    if (m_IO_X14 == newIO_X14)
        return;
    m_IO_X14 = newIO_X14;
    emit IO_X14Changed();
}

bool ModbusControl::IO_X15() const
{
    return m_IO_X15;
}

void ModbusControl::setIO_X15(bool newIO_X15)
{
    if (m_IO_X15 == newIO_X15)
        return;
    m_IO_X15 = newIO_X15;
    emit IO_X15Changed();
}

bool ModbusControl::LeftAngleFeedBack() const
{
    return m_LeftAngleFeedBack;
}

void ModbusControl::setLeftAngleFeedBack(bool newLeftAngleFeedBack)
{
    if (m_LeftAngleFeedBack == newLeftAngleFeedBack)
        return;
    m_LeftAngleFeedBack = newLeftAngleFeedBack;
    emit LeftAngleFeedBackChanged();
}

bool ModbusControl::RightAngleFeedBack() const
{
    return m_RightAngleFeedBack;
}

void ModbusControl::setRightAngleFeedBack(bool newRightAngleFeedBack)
{
    if (m_RightAngleFeedBack == newRightAngleFeedBack)
        return;
    m_RightAngleFeedBack = newRightAngleFeedBack;
    emit RightAngleFeedBackChanged();
}



QString ModbusControl::CurrentLocationValue() const
{
    return m_CurrentLocationValue;
}

void ModbusControl::setCurrentLocationValue(const QString &newCurrentLocationValue)
{
    if (m_CurrentLocationValue == newCurrentLocationValue)
        return;
    m_CurrentLocationValue = newCurrentLocationValue;
    emit CurrentLocationValueChanged();
}

QString ModbusControl::OriginValue() const
{
    return m_OriginValue;
}

void ModbusControl::setOriginValue(const QString &newOriginValue)
{
    if (m_OriginValue == newOriginValue)
        return;
    m_OriginValue = newOriginValue;
    emit OriginValueChanged();
}

QString ModbusControl::MaxCutLength() const
{
    return m_MaxCutLength;
}

void ModbusControl::setMaxCutLength(const QString &newMaxCutLength)
{
    if (m_MaxCutLength == newMaxCutLength)
        return;
    m_MaxCutLength = newMaxCutLength;
    emit MaxCutLengthChanged();
}

QString ModbusControl::Angle45SafeDistance() const
{
    return m_Angle45SafeDistance;
}

void ModbusControl::setAngle45SafeDistance(const QString &newAngle45SafeDistance)
{
    if (m_Angle45SafeDistance == newAngle45SafeDistance)
        return;
    m_Angle45SafeDistance = newAngle45SafeDistance;
    emit Angle45SafeDistanceChanged();
}

QString ModbusControl::Manual_MaterialLengthMax() const
{
    return m_Manual_MaterialLengthMax;
}

void ModbusControl::setManual_MaterialLengthMax(const QString &newManual_MaterialLengthMax)
{
    if (m_Manual_MaterialLengthMax == newManual_MaterialLengthMax)
        return;
    m_Manual_MaterialLengthMax = newManual_MaterialLengthMax;
    emit Manual_MaterialLengthMaxChanged();
}

QString ModbusControl::Manual_MaterialLengthMin() const
{
    return m_Manual_MaterialLengthMin;
}

void ModbusControl::setManual_MaterialLengthMin(const QString &newManual_MaterialLengthMin)
{
    if (m_Manual_MaterialLengthMin == newManual_MaterialLengthMin)
        return;
    m_Manual_MaterialLengthMin = newManual_MaterialLengthMin;
    emit Manual_MaterialLengthMinChanged();
}

bool ModbusControl::MechineChangeAngleMode() const
{
    return m_MechineChangeAngleMode;
}

void ModbusControl::setMechineChangeAngleMode(bool newMechineChangeAngleMode)
{
    if (m_MechineChangeAngleMode == newMechineChangeAngleMode)
        return;
    m_MechineChangeAngleMode = newMechineChangeAngleMode;
    emit MechineChangeAngleModeChanged();
}

QString ModbusControl::ExtraLong_MaterialLengthValue() const
{
    return m_ExtraLong_MaterialLengthValue;
}

void ModbusControl::setExtraLong_MaterialLengthValue(const QString &newExtraLong_MaterialLengthValue)
{
    if (m_ExtraLong_MaterialLengthValue == newExtraLong_MaterialLengthValue)
        return;
    m_ExtraLong_MaterialLengthValue = newExtraLong_MaterialLengthValue;
    emit ExtraLong_MaterialLengthValueChanged();
}

QString ModbusControl::ExtraLong_CompensateValue() const
{
    return m_ExtraLong_CompensateValue;
}

void ModbusControl::setExtraLong_CompensateValue(const QString &newExtraLong_CompensateValue)
{
    if (m_ExtraLong_CompensateValue == newExtraLong_CompensateValue)
        return;
    m_ExtraLong_CompensateValue = newExtraLong_CompensateValue;
    emit ExtraLong_CompensateValueChanged();
}

QString ModbusControl::ExtraLong_MaterialLengthMax() const
{
    return m_ExtraLong_MaterialLengthMax;
}

void ModbusControl::setExtraLong_MaterialLengthMax(const QString &newExtraLong_MaterialLengthMax)
{
    if (m_ExtraLong_MaterialLengthMax == newExtraLong_MaterialLengthMax)
        return;
    m_ExtraLong_MaterialLengthMax = newExtraLong_MaterialLengthMax;
    emit ExtraLong_MaterialLengthMaxChanged();
}

QString ModbusControl::ExtraLong_MaterialLengthMin() const
{
    return m_ExtraLong_MaterialLengthMin;
}

void ModbusControl::setExtraLong_MaterialLengthMin(const QString &newExtraLong_MaterialLengthMin)
{
    if (m_ExtraLong_MaterialLengthMin == newExtraLong_MaterialLengthMin)
        return;
    m_ExtraLong_MaterialLengthMin = newExtraLong_MaterialLengthMin;
    emit ExtraLong_MaterialLengthMinChanged();
}

QString ModbusControl::ExtraShort_MaterialLengthValue() const
{
    return m_ExtraShort_MaterialLengthValue;
}

void ModbusControl::setExtraShort_MaterialLengthValue(const QString &newExtraShort_MaterialLengthValue)
{
    if (m_ExtraShort_MaterialLengthValue == newExtraShort_MaterialLengthValue)
        return;
    m_ExtraShort_MaterialLengthValue = newExtraShort_MaterialLengthValue;
    emit ExtraShort_MaterialLengthValueChanged();
}

QString ModbusControl::ExtraShort_CompensateValue() const
{
    return m_ExtraShort_CompensateValue;
}

void ModbusControl::setExtraShort_CompensateValue(const QString &newExtraShort_CompensateValue)
{
    if (m_ExtraShort_CompensateValue == newExtraShort_CompensateValue)
        return;
    m_ExtraShort_CompensateValue = newExtraShort_CompensateValue;
    emit ExtraShort_CompensateValueChanged();
}

QString ModbusControl::ExtraShort_PullBackDistance() const
{
    return m_ExtraShort_PullBackDistance;
}

void ModbusControl::setExtraShort_PullBackDistance(const QString &newExtraShort_PullBackDistance)
{
    if (m_ExtraShort_PullBackDistance == newExtraShort_PullBackDistance)
        return;
    m_ExtraShort_PullBackDistance = newExtraShort_PullBackDistance;
    emit ExtraShort_PullBackDistanceChanged();
}

QString ModbusControl::ExtraShort_MaterialLengthMax() const
{
    return m_ExtraShort_MaterialLengthMax;
}

void ModbusControl::setExtraShort_MaterialLengthMax(const QString &newExtraShort_MaterialLengthMax)
{
    if (m_ExtraShort_MaterialLengthMax == newExtraShort_MaterialLengthMax)
        return;
    m_ExtraShort_MaterialLengthMax = newExtraShort_MaterialLengthMax;
    emit ExtraShort_MaterialLengthMaxChanged();
}

QString ModbusControl::ExtraShort_MaterialLengthMin() const
{
    return m_ExtraShort_MaterialLengthMin;
}

void ModbusControl::setExtraShort_MaterialLengthMin(const QString &newExtraShort_MaterialLengthMin)
{
    if (m_ExtraShort_MaterialLengthMin == newExtraShort_MaterialLengthMin)
        return;
    m_ExtraShort_MaterialLengthMin = newExtraShort_MaterialLengthMin;
    emit ExtraShort_MaterialLengthMinChanged();
}

QString ModbusControl::Corner_Current_Segments() const
{
    return m_Corner_Current_Segments;
}

void ModbusControl::setCorner_Current_Segments(const QString &newCorner_Current_Segments)
{
    if (m_Corner_Current_Segments == newCorner_Current_Segments)
        return;
    m_Corner_Current_Segments = newCorner_Current_Segments;
    emit Corner_Current_SegmentsChanged();
}

QString ModbusControl::Corner_Worked_Segments() const
{
    return m_Corner_Worked_Segments;
}

void ModbusControl::setCorner_Worked_Segments(const QString &newCorner_Worked_Segments)
{
    if (m_Corner_Worked_Segments == newCorner_Worked_Segments)
        return;
    m_Corner_Worked_Segments = newCorner_Worked_Segments;
    emit Corner_Worked_SegmentsChanged();
}

QString ModbusControl::Corner_Min_Length() const
{
    return m_Corner_Min_Length;
}

void ModbusControl::setCorner_Min_Length(const QString &newCorner_Min_Length)
{
    if (m_Corner_Min_Length == newCorner_Min_Length)
        return;
    m_Corner_Min_Length = newCorner_Min_Length;
    emit Corner_Min_LengthChanged();
}

QString ModbusControl::Corner_Material_Length() const
{
    return m_Corner_Material_Length;
}

void ModbusControl::setCorner_Material_Length(const QString &newCorner_Material_Length)
{
    if (m_Corner_Material_Length == newCorner_Material_Length)
        return;
    m_Corner_Material_Length = newCorner_Material_Length;
    emit Corner_Material_LengthChanged();
}

QString ModbusControl::Corner_Cut_Compensate() const
{
    return m_Corner_Cut_Compensate;
}

void ModbusControl::setCorner_Cut_Compensate(const QString &newCorner_Cut_Compensate)
{
    if (m_Corner_Cut_Compensate == newCorner_Cut_Compensate)
        return;
    m_Corner_Cut_Compensate = newCorner_Cut_Compensate;
    emit Corner_Cut_CompensateChanged();
}

QString ModbusControl::Corner_Length() const
{
    return m_Corner_Length;
}

void ModbusControl::setCorner_Length(const QString &newCorner_Length)
{
    if (m_Corner_Length == newCorner_Length)
        return;
    m_Corner_Length = newCorner_Length;
    emit Corner_LengthChanged();
}

QString ModbusControl::Corner_Set_Segments() const
{
    return m_Corner_Set_Segments;
}

void ModbusControl::setCorner_Set_Segments(const QString &newCorner_Set_Segments)
{
    if (m_Corner_Set_Segments == newCorner_Set_Segments)
        return;
    m_Corner_Set_Segments = newCorner_Set_Segments;
    emit Corner_Set_SegmentsChanged();
}

bool ModbusControl::Corner_Set_Err() const
{
    return m_Corner_Set_Err;
}

void ModbusControl::setCorner_Set_Err(bool newCorner_Set_Err)
{
    if (m_Corner_Set_Err == newCorner_Set_Err)
        return;
    m_Corner_Set_Err = newCorner_Set_Err;
    emit Corner_Set_ErrChanged();
}

bool ModbusControl::AutoObserveState() const
{
    return m_AutoObserveState;
}

void ModbusControl::setAutoObserveState(bool newAutoObserveState)
{
    if (m_AutoObserveState == newAutoObserveState)
        return;
    m_AutoObserveState = newAutoObserveState;
    emit AutoObserveStateChanged();
}

bool ModbusControl::PowerOffMode() const
{
    return m_PowerOffMode;
}

void ModbusControl::setPowerOffMode(bool newPowerOffMode)
{
    if (m_PowerOffMode == newPowerOffMode)
        return;
    m_PowerOffMode = newPowerOffMode;
    emit PowerOffModeChanged();
}

QString ModbusControl::Location_Speed() const
{
    return m_Location_Speed;
}

void ModbusControl::setLocation_Speed(const QString &newLocation_Speed)
{
    if (m_Location_Speed == newLocation_Speed)
        return;
    m_Location_Speed = newLocation_Speed;
    emit Location_SpeedChanged();
}

QString ModbusControl::Manual_Speed() const
{
    return m_Manual_Speed;
}

void ModbusControl::setManual_Speed(const QString &newManual_Speed)
{
    if (m_Manual_Speed == newManual_Speed)
        return;
    m_Manual_Speed = newManual_Speed;
    emit Manual_SpeedChanged();
}

QString ModbusControl::Impact_Active_Time() const
{
    return m_Impact_Active_Time;
}

void ModbusControl::setImpact_Active_Time(const QString &newImpact_Active_Time)
{
    if (m_Impact_Active_Time == newImpact_Active_Time)
        return;
    m_Impact_Active_Time = newImpact_Active_Time;
    emit Impact_Active_TimeChanged();
}

QString ModbusControl::MaterialHeight_ObserveTime() const
{
    return m_MaterialHeight_ObserveTime;
}

void ModbusControl::setMaterialHeight_ObserveTime(const QString &newMaterialHeight_ObserveTime)
{
    if (m_MaterialHeight_ObserveTime == newMaterialHeight_ObserveTime)
        return;
    m_MaterialHeight_ObserveTime = newMaterialHeight_ObserveTime;
    emit MaterialHeight_ObserveTimeChanged();
}

QString ModbusControl::MaterialHeight_DisplaceMent() const
{
    return m_MaterialHeight_DisplaceMent;
}

void ModbusControl::setMaterialHeight_DisplaceMent(const QString &newMaterialHeight_DisplaceMent)
{
    if (m_MaterialHeight_DisplaceMent == newMaterialHeight_DisplaceMent)
        return;
    m_MaterialHeight_DisplaceMent = newMaterialHeight_DisplaceMent;
    emit MaterialHeight_DisplaceMentChanged();
}

QString ModbusControl::LeftSaw_Out_Time() const
{
    return m_LeftSaw_Out_Time;
}

void ModbusControl::setLeftSaw_Out_Time(const QString &newLeftSaw_Out_Time)
{
    if (m_LeftSaw_Out_Time == newLeftSaw_Out_Time)
        return;
    m_LeftSaw_Out_Time = newLeftSaw_Out_Time;
    emit LeftSaw_Out_TimeChanged();
}

QString ModbusControl::RightSaw_Out_Time() const
{
    return m_RightSaw_Out_Time;
}

void ModbusControl::setRightSaw_Out_Time(const QString &newRightSaw_Out_Time)
{
    if (m_RightSaw_Out_Time == newRightSaw_Out_Time)
        return;
    m_RightSaw_Out_Time = newRightSaw_Out_Time;
    emit RightSaw_Out_TimeChanged();
}

QString ModbusControl::DoubleSaws_45_Compensate() const
{
    return m_DoubleSaws_45_Compensate;
}

void ModbusControl::setDoubleSaws_45_Compensate(const QString &newDoubleSaws_45_Compensate)
{
    if (m_DoubleSaws_45_Compensate == newDoubleSaws_45_Compensate)
        return;
    m_DoubleSaws_45_Compensate = newDoubleSaws_45_Compensate;
    emit DoubleSaws_45_CompensateChanged();
}

QString ModbusControl::SingleSaw_45_Compensate() const
{
    return m_SingleSaw_45_Compensate;
}

void ModbusControl::setSingleSaw_45_Compensate(const QString &newSingleSaw_45_Compensate)
{
    if (m_SingleSaw_45_Compensate == newSingleSaw_45_Compensate)
        return;
    m_SingleSaw_45_Compensate = newSingleSaw_45_Compensate;
    emit SingleSaw_45_CompensateChanged();
}

QString ModbusControl::Blow_Time() const
{
    return m_Blow_Time;
}

void ModbusControl::setBlow_Time(const QString &newBlow_Time)
{
    if (m_Blow_Time == newBlow_Time)
        return;
    m_Blow_Time = newBlow_Time;
    emit Blow_TimeChanged();
}

QString ModbusControl::PowerOff_Delay_Time() const
{
    return m_PowerOff_Delay_Time;
}

void ModbusControl::setPowerOff_Delay_Time(const QString &newPowerOff_Delay_Time)
{
    if (m_PowerOff_Delay_Time == newPowerOff_Delay_Time)
        return;
    m_PowerOff_Delay_Time = newPowerOff_Delay_Time;
    emit PowerOff_Delay_TimeChanged();
}

QString ModbusControl::Encoder_Value() const
{
    return m_Encoder_Value;
}

void ModbusControl::setEncoder_Value(const QString &newEncoder_Value)
{
    if (m_Encoder_Value == newEncoder_Value)
        return;
    m_Encoder_Value = newEncoder_Value;
    emit Encoder_ValueChanged();
}

QString ModbusControl::PulseNumber_PerRound() const
{
    return m_PulseNumber_PerRound;
}

void ModbusControl::setPulseNumber_PerRound(const QString &newPulseNumber_PerRound)
{
    if (m_PulseNumber_PerRound == newPulseNumber_PerRound)
        return;
    m_PulseNumber_PerRound = newPulseNumber_PerRound;
    emit PulseNumber_PerRoundChanged();
}

QString ModbusControl::DistanceNumber_PerRound() const
{
    return m_DistanceNumber_PerRound;
}

void ModbusControl::setDistanceNumber_PerRound(const QString &newDistanceNumber_PerRound)
{
    if (m_DistanceNumber_PerRound == newDistanceNumber_PerRound)
        return;
    m_DistanceNumber_PerRound = newDistanceNumber_PerRound;
    emit DistanceNumber_PerRoundChanged();
}

QString ModbusControl::TimeOf_ACC_DEC() const
{
    return m_TimeOf_ACC_DEC;
}

void ModbusControl::setTimeOf_ACC_DEC(const QString &newTimeOf_ACC_DEC)
{
    if (m_TimeOf_ACC_DEC == newTimeOf_ACC_DEC)
        return;
    m_TimeOf_ACC_DEC = newTimeOf_ACC_DEC;
    emit TimeOf_ACC_DECChanged();
}

QString ModbusControl::Reverse_Soft_Limit() const
{
    return m_Reverse_Soft_Limit;
}

void ModbusControl::setReverse_Soft_Limit(const QString &newReverse_Soft_Limit)
{
    if (m_Reverse_Soft_Limit == newReverse_Soft_Limit)
        return;
    m_Reverse_Soft_Limit = newReverse_Soft_Limit;
    emit Reverse_Soft_LimitChanged();
}

QString ModbusControl::FindZero_HighSpeed() const
{
    return m_FindZero_HighSpeed;
}

void ModbusControl::setFindZero_HighSpeed(const QString &newFindZero_HighSpeed)
{
    if (m_FindZero_HighSpeed == newFindZero_HighSpeed)
        return;
    m_FindZero_HighSpeed = newFindZero_HighSpeed;
    emit FindZero_HighSpeedChanged();
}

QString ModbusControl::FindZero_LowSpeed() const
{
    return m_FindZero_LowSpeed;
}

void ModbusControl::setFindZero_LowSpeed(const QString &newFindZero_LowSpeed)
{
    if (m_FindZero_LowSpeed == newFindZero_LowSpeed)
        return;
    m_FindZero_LowSpeed = newFindZero_LowSpeed;
    emit FindZero_LowSpeedChanged();
}

QString ModbusControl::Brake_OpenTime() const
{
    return m_Brake_OpenTime;
}

void ModbusControl::setBrake_OpenTime(const QString &newBrake_OpenTime)
{
    if (m_Brake_OpenTime == newBrake_OpenTime)
        return;
    m_Brake_OpenTime = newBrake_OpenTime;
    emit Brake_OpenTimeChanged();
}

QString ModbusControl::Brake_CloseTime() const
{
    return m_Brake_CloseTime;
}

void ModbusControl::setBrake_CloseTime(const QString &newBrake_CloseTime)
{
    if (m_Brake_CloseTime == newBrake_CloseTime)
        return;
    m_Brake_CloseTime = newBrake_CloseTime;
    emit Brake_CloseTimeChanged();
}

bool ModbusControl::ServoType() const
{
    return m_ServoType;
}

void ModbusControl::setServoType(bool newServoType)
{
    if (m_ServoType == newServoType)
        return;
    m_ServoType = newServoType;
    emit ServoTypeChanged();
}

QString ModbusControl::Hold_Safe_Distance() const
{
    return m_Hold_Safe_Distance;
}

void ModbusControl::setHold_Safe_Distance(const QString &newHold_Safe_Distance)
{
    if (m_Hold_Safe_Distance == newHold_Safe_Distance)
        return;
    m_Hold_Safe_Distance = newHold_Safe_Distance;
    emit Hold_Safe_DistanceChanged();
}

QString ModbusControl::Front_Hold_Location() const
{
    return m_Front_Hold_Location;
}

void ModbusControl::setFront_Hold_Location(const QString &newFront_Hold_Location)
{
    if (m_Front_Hold_Location == newFront_Hold_Location)
        return;
    m_Front_Hold_Location = newFront_Hold_Location;
    emit Front_Hold_LocationChanged();
}

QString ModbusControl::Mid_Hold_Location_Down_Limit() const
{
    return m_Mid_Hold_Location_Down_Limit;
}

void ModbusControl::setMid_Hold_Location_Down_Limit(const QString &newMid_Hold_Location_Down_Limit)
{
    if (m_Mid_Hold_Location_Down_Limit == newMid_Hold_Location_Down_Limit)
        return;
    m_Mid_Hold_Location_Down_Limit = newMid_Hold_Location_Down_Limit;
    emit Mid_Hold_Location_Down_LimitChanged();
}

QString ModbusControl::Mid_Hold_Location_Up_Limit() const
{
    return m_Mid_Hold_Location_Up_Limit;
}

void ModbusControl::setMid_Hold_Location_Up_Limit(const QString &newMid_Hold_Location_Up_Limit)
{
    if (m_Mid_Hold_Location_Up_Limit == newMid_Hold_Location_Up_Limit)
        return;
    m_Mid_Hold_Location_Up_Limit = newMid_Hold_Location_Up_Limit;
    emit Mid_Hold_Location_Up_LimitChanged();
}

QString ModbusControl::Back_Hold_Location() const
{
    return m_Back_Hold_Location;
}

void ModbusControl::setBack_Hold_Location(const QString &newBack_Hold_Location)
{
    if (m_Back_Hold_Location == newBack_Hold_Location)
        return;
    m_Back_Hold_Location = newBack_Hold_Location;
    emit Back_Hold_LocationChanged();
}

bool ModbusControl::IO_Y15() const
{
    return m_IO_Y15;
}

void ModbusControl::setIO_Y15(bool newIO_Y15)
{
    if (m_IO_Y15 == newIO_Y15)
        return;
    m_IO_Y15 = newIO_Y15;
    emit IO_Y15Changed();
}

bool ModbusControl::IO_Y16() const
{
    return m_IO_Y16;
}

void ModbusControl::setIO_Y16(bool newIO_Y16)
{
    if (m_IO_Y16 == newIO_Y16)
        return;
    m_IO_Y16 = newIO_Y16;
    emit IO_Y16Changed();
}

bool ModbusControl::IO_Y17() const
{
    return m_IO_Y17;
}

void ModbusControl::setIO_Y17(bool newIO_Y17)
{
    if (m_IO_Y17 == newIO_Y17)
        return;
    m_IO_Y17 = newIO_Y17;
    emit IO_Y17Changed();
}

bool ModbusControl::Front_Hold_BackOver() const
{
    return m_Front_Hold_BackOver;
}

void ModbusControl::setFront_Hold_BackOver(bool newFront_Hold_BackOver)
{
    if (m_Front_Hold_BackOver == newFront_Hold_BackOver)
        return;
    m_Front_Hold_BackOver = newFront_Hold_BackOver;
    emit Front_Hold_BackOverChanged();
}

bool ModbusControl::Mid_Hold_BackOver() const
{
    return m_Mid_Hold_BackOver;
}

void ModbusControl::setMid_Hold_BackOver(bool newMid_Hold_BackOver)
{
    if (m_Mid_Hold_BackOver == newMid_Hold_BackOver)
        return;
    m_Mid_Hold_BackOver = newMid_Hold_BackOver;
    emit Mid_Hold_BackOverChanged();
}

bool ModbusControl::Back_Hold_BackOver() const
{
    return m_Back_Hold_BackOver;
}

void ModbusControl::setBack_Hold_BackOver(bool newBack_Hold_BackOver)
{
    if (m_Back_Hold_BackOver == newBack_Hold_BackOver)
        return;
    m_Back_Hold_BackOver = newBack_Hold_BackOver;
    emit Back_Hold_BackOverChanged();
}

bool ModbusControl::Front_Hold_Enable() const
{
    return m_Front_Hold_Enable;
}

void ModbusControl::setFront_Hold_Enable(bool newFront_Hold_Enable)
{
    if (m_Front_Hold_Enable == newFront_Hold_Enable)
        return;
    m_Front_Hold_Enable = newFront_Hold_Enable;
    emit Front_Hold_EnableChanged();
}

bool ModbusControl::Mid_Hold_Enable() const
{
    return m_Mid_Hold_Enable;
}

void ModbusControl::setMid_Hold_Enable(bool newMid_Hold_Enable)
{
    if (m_Mid_Hold_Enable == newMid_Hold_Enable)
        return;
    m_Mid_Hold_Enable = newMid_Hold_Enable;
    emit Mid_Hold_EnableChanged();
}

bool ModbusControl::Back_Hold_Enable() const
{
    return m_Back_Hold_Enable;
}

void ModbusControl::setBack_Hold_Enable(bool newBack_Hold_Enable)
{
    if (m_Back_Hold_Enable == newBack_Hold_Enable)
        return;
    m_Back_Hold_Enable = newBack_Hold_Enable;
    emit Back_Hold_EnableChanged();
}

bool ModbusControl::Front_Hold_Mode() const
{
    return m_Front_Hold_Mode;
}

void ModbusControl::setFront_Hold_Mode(bool newFront_Hold_Mode)
{
    if (m_Front_Hold_Mode == newFront_Hold_Mode)
        return;
    m_Front_Hold_Mode = newFront_Hold_Mode;
    emit Front_Hold_ModeChanged();
}

bool ModbusControl::Back_Hold_Mode() const
{
    return m_Back_Hold_Mode;
}

void ModbusControl::setBack_Hold_Mode(bool newBack_Hold_Mode)
{
    if (m_Back_Hold_Mode == newBack_Hold_Mode)
        return;
    m_Back_Hold_Mode = newBack_Hold_Mode;
    emit Back_Hold_ModeChanged();
}

bool ModbusControl::Hold_Exist() const
{
    return m_Hold_Exist;
}

void ModbusControl::setHold_Exist(bool newHold_Exist)
{
    if (m_Hold_Exist == newHold_Exist)
        return;
    m_Hold_Exist = newHold_Exist;
    emit Hold_ExistChanged();
}

QString ModbusControl::Location_Compensate_01() const
{
    return m_Location_Compensate_01;
}

void ModbusControl::setLocation_Compensate_01(const QString &newLocation_Compensate_01)
{
    if (m_Location_Compensate_01 == newLocation_Compensate_01)
        return;
    m_Location_Compensate_01 = newLocation_Compensate_01;
    emit Location_Compensate_01Changed();
}

QString ModbusControl::Location_Compensate_02() const
{
    return m_Location_Compensate_02;
}

void ModbusControl::setLocation_Compensate_02(const QString &newLocation_Compensate_02)
{
    if (m_Location_Compensate_02 == newLocation_Compensate_02)
        return;
    m_Location_Compensate_02 = newLocation_Compensate_02;
    emit Location_Compensate_02Changed();
}

QString ModbusControl::Location_Compensate_03() const
{
    return m_Location_Compensate_03;
}

void ModbusControl::setLocation_Compensate_03(const QString &newLocation_Compensate_03)
{
    if (m_Location_Compensate_03 == newLocation_Compensate_03)
        return;
    m_Location_Compensate_03 = newLocation_Compensate_03;
    emit Location_Compensate_03Changed();
}

QString ModbusControl::Location_Compensate_04() const
{
    return m_Location_Compensate_04;
}

void ModbusControl::setLocation_Compensate_04(const QString &newLocation_Compensate_04)
{
    if (m_Location_Compensate_04 == newLocation_Compensate_04)
        return;
    m_Location_Compensate_04 = newLocation_Compensate_04;
    emit Location_Compensate_04Changed();
}

QString ModbusControl::Location_Compensate_05() const
{
    return m_Location_Compensate_05;
}

void ModbusControl::setLocation_Compensate_05(const QString &newLocation_Compensate_05)
{
    if (m_Location_Compensate_05 == newLocation_Compensate_05)
        return;
    m_Location_Compensate_05 = newLocation_Compensate_05;
    emit Location_Compensate_05Changed();
}

QString ModbusControl::Location_Compensate_06() const
{
    return m_Location_Compensate_06;
}

void ModbusControl::setLocation_Compensate_06(const QString &newLocation_Compensate_06)
{
    if (m_Location_Compensate_06 == newLocation_Compensate_06)
        return;
    m_Location_Compensate_06 = newLocation_Compensate_06;
    emit Location_Compensate_06Changed();
}

QString ModbusControl::Location_Compensate_07() const
{
    return m_Location_Compensate_07;
}

void ModbusControl::setLocation_Compensate_07(const QString &newLocation_Compensate_07)
{
    if (m_Location_Compensate_07 == newLocation_Compensate_07)
        return;
    m_Location_Compensate_07 = newLocation_Compensate_07;
    emit Location_Compensate_07Changed();
}

QString ModbusControl::Location_Compensate_08() const
{
    return m_Location_Compensate_08;
}

void ModbusControl::setLocation_Compensate_08(const QString &newLocation_Compensate_08)
{
    if (m_Location_Compensate_08 == newLocation_Compensate_08)
        return;
    m_Location_Compensate_08 = newLocation_Compensate_08;
    emit Location_Compensate_08Changed();
}

QString ModbusControl::Location_Compensate_09() const
{
    return m_Location_Compensate_09;
}

void ModbusControl::setLocation_Compensate_09(const QString &newLocation_Compensate_09)
{
    if (m_Location_Compensate_09 == newLocation_Compensate_09)
        return;
    m_Location_Compensate_09 = newLocation_Compensate_09;
    emit Location_Compensate_09Changed();
}

QString ModbusControl::Location_Compensate_10() const
{
    return m_Location_Compensate_10;
}

void ModbusControl::setLocation_Compensate_10(const QString &newLocation_Compensate_10)
{
    if (m_Location_Compensate_10 == newLocation_Compensate_10)
        return;
    m_Location_Compensate_10 = newLocation_Compensate_10;
    emit Location_Compensate_10Changed();
}

QString ModbusControl::Location_Compensate_11() const
{
    return m_Location_Compensate_11;
}

void ModbusControl::setLocation_Compensate_11(const QString &newLocation_Compensate_11)
{
    if (m_Location_Compensate_11 == newLocation_Compensate_11)
        return;
    m_Location_Compensate_11 = newLocation_Compensate_11;
    emit Location_Compensate_11Changed();
}

QString ModbusControl::Location_Compensate_12() const
{
    return m_Location_Compensate_12;
}

void ModbusControl::setLocation_Compensate_12(const QString &newLocation_Compensate_12)
{
    if (m_Location_Compensate_12 == newLocation_Compensate_12)
        return;
    m_Location_Compensate_12 = newLocation_Compensate_12;
    emit Location_Compensate_12Changed();
}

QString ModbusControl::Location_Compensate_13() const
{
    return m_Location_Compensate_13;
}

void ModbusControl::setLocation_Compensate_13(const QString &newLocation_Compensate_13)
{
    if (m_Location_Compensate_13 == newLocation_Compensate_13)
        return;
    m_Location_Compensate_13 = newLocation_Compensate_13;
    emit Location_Compensate_13Changed();
}

QString ModbusControl::Location_Compensate_14() const
{
    return m_Location_Compensate_14;
}

void ModbusControl::setLocation_Compensate_14(const QString &newLocation_Compensate_14)
{
    if (m_Location_Compensate_14 == newLocation_Compensate_14)
        return;
    m_Location_Compensate_14 = newLocation_Compensate_14;
    emit Location_Compensate_14Changed();
}

QString ModbusControl::Location_Compensate_15() const
{
    return m_Location_Compensate_15;
}

void ModbusControl::setLocation_Compensate_15(const QString &newLocation_Compensate_15)
{
    if (m_Location_Compensate_15 == newLocation_Compensate_15)
        return;
    m_Location_Compensate_15 = newLocation_Compensate_15;
    emit Location_Compensate_15Changed();
}

QString ModbusControl::Location_Compensate_16() const
{
    return m_Location_Compensate_16;
}

void ModbusControl::setLocation_Compensate_16(const QString &newLocation_Compensate_16)
{
    if (m_Location_Compensate_16 == newLocation_Compensate_16)
        return;
    m_Location_Compensate_16 = newLocation_Compensate_16;
    emit Location_Compensate_16Changed();
}

QString ModbusControl::Location_Compensate_17() const
{
    return m_Location_Compensate_17;
}

void ModbusControl::setLocation_Compensate_17(const QString &newLocation_Compensate_17)
{
    if (m_Location_Compensate_17 == newLocation_Compensate_17)
        return;
    m_Location_Compensate_17 = newLocation_Compensate_17;
    emit Location_Compensate_17Changed();
}

QString ModbusControl::Location_Compensate_18() const
{
    return m_Location_Compensate_18;
}

void ModbusControl::setLocation_Compensate_18(const QString &newLocation_Compensate_18)
{
    if (m_Location_Compensate_18 == newLocation_Compensate_18)
        return;
    m_Location_Compensate_18 = newLocation_Compensate_18;
    emit Location_Compensate_18Changed();
}

QString ModbusControl::Location_Compensate_19() const
{
    return m_Location_Compensate_19;
}

void ModbusControl::setLocation_Compensate_19(const QString &newLocation_Compensate_19)
{
    if (m_Location_Compensate_19 == newLocation_Compensate_19)
        return;
    m_Location_Compensate_19 = newLocation_Compensate_19;
    emit Location_Compensate_19Changed();
}

QString ModbusControl::Location_Compensate_20() const
{
    return m_Location_Compensate_20;
}

void ModbusControl::setLocation_Compensate_20(const QString &newLocation_Compensate_20)
{
    if (m_Location_Compensate_20 == newLocation_Compensate_20)
        return;
    m_Location_Compensate_20 = newLocation_Compensate_20;
    emit Location_Compensate_20Changed();
}

QString ModbusControl::SpecialCompensate_DownLimit() const
{
    return m_SpecialCompensate_DownLimit;
}

void ModbusControl::setSpecialCompensate_DownLimit(const QString &newSpecialCompensate_DownLimit)
{
    if (m_SpecialCompensate_DownLimit == newSpecialCompensate_DownLimit)
        return;
    m_SpecialCompensate_DownLimit = newSpecialCompensate_DownLimit;
    emit SpecialCompensate_DownLimitChanged();
}

QString ModbusControl::SpecialCompensate_UpLimit() const
{
    return m_SpecialCompensate_UpLimit;
}

void ModbusControl::setSpecialCompensate_UpLimit(const QString &newSpecialCompensate_UpLimit)
{
    if (m_SpecialCompensate_UpLimit == newSpecialCompensate_UpLimit)
        return;
    m_SpecialCompensate_UpLimit = newSpecialCompensate_UpLimit;
    emit SpecialCompensate_UpLimitChanged();
}

QString ModbusControl::SpecialCompensateValue() const
{
    return m_SpecialCompensateValue;
}

void ModbusControl::setSpecialCompensateValue(const QString &newSpecialCompensateValue)
{
    if (m_SpecialCompensateValue == newSpecialCompensateValue)
        return;
    m_SpecialCompensateValue = newSpecialCompensateValue;
    emit SpecialCompensateValueChanged();
}

bool ModbusControl::SpecialCompensate_State() const
{
    return m_SpecialCompensate_State;
}

void ModbusControl::setSpecialCompensate_State(bool newSpecialCompensate_State)
{
    if (m_SpecialCompensate_State == newSpecialCompensate_State)
        return;
    m_SpecialCompensate_State = newSpecialCompensate_State;
    emit SpecialCompensate_StateChanged();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_01() const
{
    return m_AnyLocation_Compensate_DownLimit_01;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_01(const QString &newAnyLocation_Compensate_DownLimit_01)
{
    if (m_AnyLocation_Compensate_DownLimit_01 == newAnyLocation_Compensate_DownLimit_01)
        return;
    m_AnyLocation_Compensate_DownLimit_01 = newAnyLocation_Compensate_DownLimit_01;
    emit AnyLocation_Compensate_DownLimit_01Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_01() const
{
    return m_AnyLocation_Compensate_UpLimit_01;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_01(const QString &newAnyLocation_Compensate_UpLimit_01)
{
    if (m_AnyLocation_Compensate_UpLimit_01 == newAnyLocation_Compensate_UpLimit_01)
        return;
    m_AnyLocation_Compensate_UpLimit_01 = newAnyLocation_Compensate_UpLimit_01;
    emit AnyLocation_Compensate_UpLimit_01Changed();
}

QString ModbusControl::AnyLocation_Compensate_01() const
{
    return m_AnyLocation_Compensate_01;
}

void ModbusControl::setAnyLocation_Compensate_01(const QString &newAnyLocation_Compensate_01)
{
    if (m_AnyLocation_Compensate_01 == newAnyLocation_Compensate_01)
        return;
    m_AnyLocation_Compensate_01 = newAnyLocation_Compensate_01;
    emit AnyLocation_Compensate_01Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_02() const
{
    return m_AnyLocation_Compensate_DownLimit_02;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_02(const QString &newAnyLocation_Compensate_DownLimit_02)
{
    if (m_AnyLocation_Compensate_DownLimit_02 == newAnyLocation_Compensate_DownLimit_02)
        return;
    m_AnyLocation_Compensate_DownLimit_02 = newAnyLocation_Compensate_DownLimit_02;
    emit AnyLocation_Compensate_DownLimit_02Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_02() const
{
    return m_AnyLocation_Compensate_UpLimit_02;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_02(const QString &newAnyLocation_Compensate_UpLimit_02)
{
    if (m_AnyLocation_Compensate_UpLimit_02 == newAnyLocation_Compensate_UpLimit_02)
        return;
    m_AnyLocation_Compensate_UpLimit_02 = newAnyLocation_Compensate_UpLimit_02;
    emit AnyLocation_Compensate_UpLimit_02Changed();
}

QString ModbusControl::AnyLocation_Compensate_02() const
{
    return m_AnyLocation_Compensate_02;
}

void ModbusControl::setAnyLocation_Compensate_02(const QString &newAnyLocation_Compensate_02)
{
    if (m_AnyLocation_Compensate_02 == newAnyLocation_Compensate_02)
        return;
    m_AnyLocation_Compensate_02 = newAnyLocation_Compensate_02;
    emit AnyLocation_Compensate_02Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_03() const
{
    return m_AnyLocation_Compensate_DownLimit_03;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_03(const QString &newAnyLocation_Compensate_DownLimit_03)
{
    if (m_AnyLocation_Compensate_DownLimit_03 == newAnyLocation_Compensate_DownLimit_03)
        return;
    m_AnyLocation_Compensate_DownLimit_03 = newAnyLocation_Compensate_DownLimit_03;
    emit AnyLocation_Compensate_DownLimit_03Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_03() const
{
    return m_AnyLocation_Compensate_UpLimit_03;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_03(const QString &newAnyLocation_Compensate_UpLimit_03)
{
    if (m_AnyLocation_Compensate_UpLimit_03 == newAnyLocation_Compensate_UpLimit_03)
        return;
    m_AnyLocation_Compensate_UpLimit_03 = newAnyLocation_Compensate_UpLimit_03;
    emit AnyLocation_Compensate_UpLimit_03Changed();
}

QString ModbusControl::AnyLocation_Compensate_03() const
{
    return m_AnyLocation_Compensate_03;
}

void ModbusControl::setAnyLocation_Compensate_03(const QString &newAnyLocation_Compensate_03)
{
    if (m_AnyLocation_Compensate_03 == newAnyLocation_Compensate_03)
        return;
    m_AnyLocation_Compensate_03 = newAnyLocation_Compensate_03;
    emit AnyLocation_Compensate_03Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_04() const
{
    return m_AnyLocation_Compensate_DownLimit_04;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_04(const QString &newAnyLocation_Compensate_DownLimit_04)
{
    if (m_AnyLocation_Compensate_DownLimit_04 == newAnyLocation_Compensate_DownLimit_04)
        return;
    m_AnyLocation_Compensate_DownLimit_04 = newAnyLocation_Compensate_DownLimit_04;
    emit AnyLocation_Compensate_DownLimit_04Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_04() const
{
    return m_AnyLocation_Compensate_UpLimit_04;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_04(const QString &newAnyLocation_Compensate_UpLimit_04)
{
    if (m_AnyLocation_Compensate_UpLimit_04 == newAnyLocation_Compensate_UpLimit_04)
        return;
    m_AnyLocation_Compensate_UpLimit_04 = newAnyLocation_Compensate_UpLimit_04;
    emit AnyLocation_Compensate_UpLimit_04Changed();
}

QString ModbusControl::AnyLocation_Compensate_04() const
{
    return m_AnyLocation_Compensate_04;
}

void ModbusControl::setAnyLocation_Compensate_04(const QString &newAnyLocation_Compensate_04)
{
    if (m_AnyLocation_Compensate_04 == newAnyLocation_Compensate_04)
        return;
    m_AnyLocation_Compensate_04 = newAnyLocation_Compensate_04;
    emit AnyLocation_Compensate_04Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_05() const
{
    return m_AnyLocation_Compensate_DownLimit_05;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_05(const QString &newAnyLocation_Compensate_DownLimit_05)
{
    if (m_AnyLocation_Compensate_DownLimit_05 == newAnyLocation_Compensate_DownLimit_05)
        return;
    m_AnyLocation_Compensate_DownLimit_05 = newAnyLocation_Compensate_DownLimit_05;
    emit AnyLocation_Compensate_DownLimit_05Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_05() const
{
    return m_AnyLocation_Compensate_UpLimit_05;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_05(const QString &newAnyLocation_Compensate_UpLimit_05)
{
    if (m_AnyLocation_Compensate_UpLimit_05 == newAnyLocation_Compensate_UpLimit_05)
        return;
    m_AnyLocation_Compensate_UpLimit_05 = newAnyLocation_Compensate_UpLimit_05;
    emit AnyLocation_Compensate_UpLimit_05Changed();
}

QString ModbusControl::AnyLocation_Compensate_05() const
{
    return m_AnyLocation_Compensate_05;
}

void ModbusControl::setAnyLocation_Compensate_05(const QString &newAnyLocation_Compensate_05)
{
    if (m_AnyLocation_Compensate_05 == newAnyLocation_Compensate_05)
        return;
    m_AnyLocation_Compensate_05 = newAnyLocation_Compensate_05;
    emit AnyLocation_Compensate_05Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_06() const
{
    return m_AnyLocation_Compensate_DownLimit_06;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_06(const QString &newAnyLocation_Compensate_DownLimit_06)
{
    if (m_AnyLocation_Compensate_DownLimit_06 == newAnyLocation_Compensate_DownLimit_06)
        return;
    m_AnyLocation_Compensate_DownLimit_06 = newAnyLocation_Compensate_DownLimit_06;
    emit AnyLocation_Compensate_DownLimit_06Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_06() const
{
    return m_AnyLocation_Compensate_UpLimit_06;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_06(const QString &newAnyLocation_Compensate_UpLimit_06)
{
    if (m_AnyLocation_Compensate_UpLimit_06 == newAnyLocation_Compensate_UpLimit_06)
        return;
    m_AnyLocation_Compensate_UpLimit_06 = newAnyLocation_Compensate_UpLimit_06;
    emit AnyLocation_Compensate_UpLimit_06Changed();
}

QString ModbusControl::AnyLocation_Compensate_06() const
{
    return m_AnyLocation_Compensate_06;
}

void ModbusControl::setAnyLocation_Compensate_06(const QString &newAnyLocation_Compensate_06)
{
    if (m_AnyLocation_Compensate_06 == newAnyLocation_Compensate_06)
        return;
    m_AnyLocation_Compensate_06 = newAnyLocation_Compensate_06;
    emit AnyLocation_Compensate_06Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_07() const
{
    return m_AnyLocation_Compensate_DownLimit_07;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_07(const QString &newAnyLocation_Compensate_DownLimit_07)
{
    if (m_AnyLocation_Compensate_DownLimit_07 == newAnyLocation_Compensate_DownLimit_07)
        return;
    m_AnyLocation_Compensate_DownLimit_07 = newAnyLocation_Compensate_DownLimit_07;
    emit AnyLocation_Compensate_DownLimit_07Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_07() const
{
    return m_AnyLocation_Compensate_UpLimit_07;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_07(const QString &newAnyLocation_Compensate_UpLimit_07)
{
    if (m_AnyLocation_Compensate_UpLimit_07 == newAnyLocation_Compensate_UpLimit_07)
        return;
    m_AnyLocation_Compensate_UpLimit_07 = newAnyLocation_Compensate_UpLimit_07;
    emit AnyLocation_Compensate_UpLimit_07Changed();
}

QString ModbusControl::AnyLocation_Compensate_07() const
{
    return m_AnyLocation_Compensate_07;
}

void ModbusControl::setAnyLocation_Compensate_07(const QString &newAnyLocation_Compensate_07)
{
    if (m_AnyLocation_Compensate_07 == newAnyLocation_Compensate_07)
        return;
    m_AnyLocation_Compensate_07 = newAnyLocation_Compensate_07;
    emit AnyLocation_Compensate_07Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_08() const
{
    return m_AnyLocation_Compensate_DownLimit_08;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_08(const QString &newAnyLocation_Compensate_DownLimit_08)
{
    if (m_AnyLocation_Compensate_DownLimit_08 == newAnyLocation_Compensate_DownLimit_08)
        return;
    m_AnyLocation_Compensate_DownLimit_08 = newAnyLocation_Compensate_DownLimit_08;
    emit AnyLocation_Compensate_DownLimit_08Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_08() const
{
    return m_AnyLocation_Compensate_UpLimit_08;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_08(const QString &newAnyLocation_Compensate_UpLimit_08)
{
    if (m_AnyLocation_Compensate_UpLimit_08 == newAnyLocation_Compensate_UpLimit_08)
        return;
    m_AnyLocation_Compensate_UpLimit_08 = newAnyLocation_Compensate_UpLimit_08;
    emit AnyLocation_Compensate_UpLimit_08Changed();
}

QString ModbusControl::AnyLocation_Compensate_08() const
{
    return m_AnyLocation_Compensate_08;
}

void ModbusControl::setAnyLocation_Compensate_08(const QString &newAnyLocation_Compensate_08)
{
    if (m_AnyLocation_Compensate_08 == newAnyLocation_Compensate_08)
        return;
    m_AnyLocation_Compensate_08 = newAnyLocation_Compensate_08;
    emit AnyLocation_Compensate_08Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_09() const
{
    return m_AnyLocation_Compensate_DownLimit_09;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_09(const QString &newAnyLocation_Compensate_DownLimit_09)
{
    if (m_AnyLocation_Compensate_DownLimit_09 == newAnyLocation_Compensate_DownLimit_09)
        return;
    m_AnyLocation_Compensate_DownLimit_09 = newAnyLocation_Compensate_DownLimit_09;
    emit AnyLocation_Compensate_DownLimit_09Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_09() const
{
    return m_AnyLocation_Compensate_UpLimit_09;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_09(const QString &newAnyLocation_Compensate_UpLimit_09)
{
    if (m_AnyLocation_Compensate_UpLimit_09 == newAnyLocation_Compensate_UpLimit_09)
        return;
    m_AnyLocation_Compensate_UpLimit_09 = newAnyLocation_Compensate_UpLimit_09;
    emit AnyLocation_Compensate_UpLimit_09Changed();
}

QString ModbusControl::AnyLocation_Compensate_09() const
{
    return m_AnyLocation_Compensate_09;
}

void ModbusControl::setAnyLocation_Compensate_09(const QString &newAnyLocation_Compensate_09)
{
    if (m_AnyLocation_Compensate_09 == newAnyLocation_Compensate_09)
        return;
    m_AnyLocation_Compensate_09 = newAnyLocation_Compensate_09;
    emit AnyLocation_Compensate_09Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_10() const
{
    return m_AnyLocation_Compensate_DownLimit_10;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_10(const QString &newAnyLocation_Compensate_DownLimit_10)
{
    if (m_AnyLocation_Compensate_DownLimit_10 == newAnyLocation_Compensate_DownLimit_10)
        return;
    m_AnyLocation_Compensate_DownLimit_10 = newAnyLocation_Compensate_DownLimit_10;
    emit AnyLocation_Compensate_DownLimit_10Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_10() const
{
    return m_AnyLocation_Compensate_UpLimit_10;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_10(const QString &newAnyLocation_Compensate_UpLimit_10)
{
    if (m_AnyLocation_Compensate_UpLimit_10 == newAnyLocation_Compensate_UpLimit_10)
        return;
    m_AnyLocation_Compensate_UpLimit_10 = newAnyLocation_Compensate_UpLimit_10;
    emit AnyLocation_Compensate_UpLimit_10Changed();
}

QString ModbusControl::AnyLocation_Compensate_10() const
{
    return m_AnyLocation_Compensate_10;
}

void ModbusControl::setAnyLocation_Compensate_10(const QString &newAnyLocation_Compensate_10)
{
    if (m_AnyLocation_Compensate_10 == newAnyLocation_Compensate_10)
        return;
    m_AnyLocation_Compensate_10 = newAnyLocation_Compensate_10;
    emit AnyLocation_Compensate_10Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_11() const
{
    return m_AnyLocation_Compensate_DownLimit_11;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_11(const QString &newAnyLocation_Compensate_DownLimit_11)
{
    if (m_AnyLocation_Compensate_DownLimit_11 == newAnyLocation_Compensate_DownLimit_11)
        return;
    m_AnyLocation_Compensate_DownLimit_11 = newAnyLocation_Compensate_DownLimit_11;
    emit AnyLocation_Compensate_DownLimit_11Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_11() const
{
    return m_AnyLocation_Compensate_UpLimit_11;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_11(const QString &newAnyLocation_Compensate_UpLimit_11)
{
    if (m_AnyLocation_Compensate_UpLimit_11 == newAnyLocation_Compensate_UpLimit_11)
        return;
    m_AnyLocation_Compensate_UpLimit_11 = newAnyLocation_Compensate_UpLimit_11;
    emit AnyLocation_Compensate_UpLimit_11Changed();
}

QString ModbusControl::AnyLocation_Compensate_11() const
{
    return m_AnyLocation_Compensate_11;
}

void ModbusControl::setAnyLocation_Compensate_11(const QString &newAnyLocation_Compensate_11)
{
    if (m_AnyLocation_Compensate_11 == newAnyLocation_Compensate_11)
        return;
    m_AnyLocation_Compensate_11 = newAnyLocation_Compensate_11;
    emit AnyLocation_Compensate_11Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_12() const
{
    return m_AnyLocation_Compensate_DownLimit_12;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_12(const QString &newAnyLocation_Compensate_DownLimit_12)
{
    if (m_AnyLocation_Compensate_DownLimit_12 == newAnyLocation_Compensate_DownLimit_12)
        return;
    m_AnyLocation_Compensate_DownLimit_12 = newAnyLocation_Compensate_DownLimit_12;
    emit AnyLocation_Compensate_DownLimit_12Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_12() const
{
    return m_AnyLocation_Compensate_UpLimit_12;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_12(const QString &newAnyLocation_Compensate_UpLimit_12)
{
    if (m_AnyLocation_Compensate_UpLimit_12 == newAnyLocation_Compensate_UpLimit_12)
        return;
    m_AnyLocation_Compensate_UpLimit_12 = newAnyLocation_Compensate_UpLimit_12;
    emit AnyLocation_Compensate_UpLimit_12Changed();
}

QString ModbusControl::AnyLocation_Compensate_12() const
{
    return m_AnyLocation_Compensate_12;
}

void ModbusControl::setAnyLocation_Compensate_12(const QString &newAnyLocation_Compensate_12)
{
    if (m_AnyLocation_Compensate_12 == newAnyLocation_Compensate_12)
        return;
    m_AnyLocation_Compensate_12 = newAnyLocation_Compensate_12;
    emit AnyLocation_Compensate_12Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_13() const
{
    return m_AnyLocation_Compensate_DownLimit_13;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_13(const QString &newAnyLocation_Compensate_DownLimit_13)
{
    if (m_AnyLocation_Compensate_DownLimit_13 == newAnyLocation_Compensate_DownLimit_13)
        return;
    m_AnyLocation_Compensate_DownLimit_13 = newAnyLocation_Compensate_DownLimit_13;
    emit AnyLocation_Compensate_DownLimit_13Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_13() const
{
    return m_AnyLocation_Compensate_UpLimit_13;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_13(const QString &newAnyLocation_Compensate_UpLimit_13)
{
    if (m_AnyLocation_Compensate_UpLimit_13 == newAnyLocation_Compensate_UpLimit_13)
        return;
    m_AnyLocation_Compensate_UpLimit_13 = newAnyLocation_Compensate_UpLimit_13;
    emit AnyLocation_Compensate_UpLimit_13Changed();
}

QString ModbusControl::AnyLocation_Compensate_13() const
{
    return m_AnyLocation_Compensate_13;
}

void ModbusControl::setAnyLocation_Compensate_13(const QString &newAnyLocation_Compensate_13)
{
    if (m_AnyLocation_Compensate_13 == newAnyLocation_Compensate_13)
        return;
    m_AnyLocation_Compensate_13 = newAnyLocation_Compensate_13;
    emit AnyLocation_Compensate_13Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_14() const
{
    return m_AnyLocation_Compensate_DownLimit_14;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_14(const QString &newAnyLocation_Compensate_DownLimit_14)
{
    if (m_AnyLocation_Compensate_DownLimit_14 == newAnyLocation_Compensate_DownLimit_14)
        return;
    m_AnyLocation_Compensate_DownLimit_14 = newAnyLocation_Compensate_DownLimit_14;
    emit AnyLocation_Compensate_DownLimit_14Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_14() const
{
    return m_AnyLocation_Compensate_UpLimit_14;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_14(const QString &newAnyLocation_Compensate_UpLimit_14)
{
    if (m_AnyLocation_Compensate_UpLimit_14 == newAnyLocation_Compensate_UpLimit_14)
        return;
    m_AnyLocation_Compensate_UpLimit_14 = newAnyLocation_Compensate_UpLimit_14;
    emit AnyLocation_Compensate_UpLimit_14Changed();
}

QString ModbusControl::AnyLocation_Compensate_14() const
{
    return m_AnyLocation_Compensate_14;
}

void ModbusControl::setAnyLocation_Compensate_14(const QString &newAnyLocation_Compensate_14)
{
    if (m_AnyLocation_Compensate_14 == newAnyLocation_Compensate_14)
        return;
    m_AnyLocation_Compensate_14 = newAnyLocation_Compensate_14;
    emit AnyLocation_Compensate_14Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_15() const
{
    return m_AnyLocation_Compensate_DownLimit_15;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_15(const QString &newAnyLocation_Compensate_DownLimit_15)
{
    if (m_AnyLocation_Compensate_DownLimit_15 == newAnyLocation_Compensate_DownLimit_15)
        return;
    m_AnyLocation_Compensate_DownLimit_15 = newAnyLocation_Compensate_DownLimit_15;
    emit AnyLocation_Compensate_DownLimit_15Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_15() const
{
    return m_AnyLocation_Compensate_UpLimit_15;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_15(const QString &newAnyLocation_Compensate_UpLimit_15)
{
    if (m_AnyLocation_Compensate_UpLimit_15 == newAnyLocation_Compensate_UpLimit_15)
        return;
    m_AnyLocation_Compensate_UpLimit_15 = newAnyLocation_Compensate_UpLimit_15;
    emit AnyLocation_Compensate_UpLimit_15Changed();
}

QString ModbusControl::AnyLocation_Compensate_15() const
{
    return m_AnyLocation_Compensate_15;
}

void ModbusControl::setAnyLocation_Compensate_15(const QString &newAnyLocation_Compensate_15)
{
    if (m_AnyLocation_Compensate_15 == newAnyLocation_Compensate_15)
        return;
    m_AnyLocation_Compensate_15 = newAnyLocation_Compensate_15;
    emit AnyLocation_Compensate_15Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_16() const
{
    return m_AnyLocation_Compensate_DownLimit_16;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_16(const QString &newAnyLocation_Compensate_DownLimit_16)
{
    if (m_AnyLocation_Compensate_DownLimit_16 == newAnyLocation_Compensate_DownLimit_16)
        return;
    m_AnyLocation_Compensate_DownLimit_16 = newAnyLocation_Compensate_DownLimit_16;
    emit AnyLocation_Compensate_DownLimit_16Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_16() const
{
    return m_AnyLocation_Compensate_UpLimit_16;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_16(const QString &newAnyLocation_Compensate_UpLimit_16)
{
    if (m_AnyLocation_Compensate_UpLimit_16 == newAnyLocation_Compensate_UpLimit_16)
        return;
    m_AnyLocation_Compensate_UpLimit_16 = newAnyLocation_Compensate_UpLimit_16;
    emit AnyLocation_Compensate_UpLimit_16Changed();
}

QString ModbusControl::AnyLocation_Compensate_16() const
{
    return m_AnyLocation_Compensate_16;
}

void ModbusControl::setAnyLocation_Compensate_16(const QString &newAnyLocation_Compensate_16)
{
    if (m_AnyLocation_Compensate_16 == newAnyLocation_Compensate_16)
        return;
    m_AnyLocation_Compensate_16 = newAnyLocation_Compensate_16;
    emit AnyLocation_Compensate_16Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_17() const
{
    return m_AnyLocation_Compensate_DownLimit_17;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_17(const QString &newAnyLocation_Compensate_DownLimit_17)
{
    if (m_AnyLocation_Compensate_DownLimit_17 == newAnyLocation_Compensate_DownLimit_17)
        return;
    m_AnyLocation_Compensate_DownLimit_17 = newAnyLocation_Compensate_DownLimit_17;
    emit AnyLocation_Compensate_DownLimit_17Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_17() const
{
    return m_AnyLocation_Compensate_UpLimit_17;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_17(const QString &newAnyLocation_Compensate_UpLimit_17)
{
    if (m_AnyLocation_Compensate_UpLimit_17 == newAnyLocation_Compensate_UpLimit_17)
        return;
    m_AnyLocation_Compensate_UpLimit_17 = newAnyLocation_Compensate_UpLimit_17;
    emit AnyLocation_Compensate_UpLimit_17Changed();
}

QString ModbusControl::AnyLocation_Compensate_17() const
{
    return m_AnyLocation_Compensate_17;
}

void ModbusControl::setAnyLocation_Compensate_17(const QString &newAnyLocation_Compensate_17)
{
    if (m_AnyLocation_Compensate_17 == newAnyLocation_Compensate_17)
        return;
    m_AnyLocation_Compensate_17 = newAnyLocation_Compensate_17;
    emit AnyLocation_Compensate_17Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_18() const
{
    return m_AnyLocation_Compensate_DownLimit_18;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_18(const QString &newAnyLocation_Compensate_DownLimit_18)
{
    if (m_AnyLocation_Compensate_DownLimit_18 == newAnyLocation_Compensate_DownLimit_18)
        return;
    m_AnyLocation_Compensate_DownLimit_18 = newAnyLocation_Compensate_DownLimit_18;
    emit AnyLocation_Compensate_DownLimit_18Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_18() const
{
    return m_AnyLocation_Compensate_UpLimit_18;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_18(const QString &newAnyLocation_Compensate_UpLimit_18)
{
    if (m_AnyLocation_Compensate_UpLimit_18 == newAnyLocation_Compensate_UpLimit_18)
        return;
    m_AnyLocation_Compensate_UpLimit_18 = newAnyLocation_Compensate_UpLimit_18;
    emit AnyLocation_Compensate_UpLimit_18Changed();
}

QString ModbusControl::AnyLocation_Compensate_18() const
{
    return m_AnyLocation_Compensate_18;
}

void ModbusControl::setAnyLocation_Compensate_18(const QString &newAnyLocation_Compensate_18)
{
    if (m_AnyLocation_Compensate_18 == newAnyLocation_Compensate_18)
        return;
    m_AnyLocation_Compensate_18 = newAnyLocation_Compensate_18;
    emit AnyLocation_Compensate_18Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_19() const
{
    return m_AnyLocation_Compensate_DownLimit_19;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_19(const QString &newAnyLocation_Compensate_DownLimit_19)
{
    if (m_AnyLocation_Compensate_DownLimit_19 == newAnyLocation_Compensate_DownLimit_19)
        return;
    m_AnyLocation_Compensate_DownLimit_19 = newAnyLocation_Compensate_DownLimit_19;
    emit AnyLocation_Compensate_DownLimit_19Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_19() const
{
    return m_AnyLocation_Compensate_UpLimit_19;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_19(const QString &newAnyLocation_Compensate_UpLimit_19)
{
    if (m_AnyLocation_Compensate_UpLimit_19 == newAnyLocation_Compensate_UpLimit_19)
        return;
    m_AnyLocation_Compensate_UpLimit_19 = newAnyLocation_Compensate_UpLimit_19;
    emit AnyLocation_Compensate_UpLimit_19Changed();
}

QString ModbusControl::AnyLocation_Compensate_19() const
{
    return m_AnyLocation_Compensate_19;
}

void ModbusControl::setAnyLocation_Compensate_19(const QString &newAnyLocation_Compensate_19)
{
    if (m_AnyLocation_Compensate_19 == newAnyLocation_Compensate_19)
        return;
    m_AnyLocation_Compensate_19 = newAnyLocation_Compensate_19;
    emit AnyLocation_Compensate_19Changed();
}

QString ModbusControl::AnyLocation_Compensate_DownLimit_20() const
{
    return m_AnyLocation_Compensate_DownLimit_20;
}

void ModbusControl::setAnyLocation_Compensate_DownLimit_20(const QString &newAnyLocation_Compensate_DownLimit_20)
{
    if (m_AnyLocation_Compensate_DownLimit_20 == newAnyLocation_Compensate_DownLimit_20)
        return;
    m_AnyLocation_Compensate_DownLimit_20 = newAnyLocation_Compensate_DownLimit_20;
    emit AnyLocation_Compensate_DownLimit_20Changed();
}

QString ModbusControl::AnyLocation_Compensate_UpLimit_20() const
{
    return m_AnyLocation_Compensate_UpLimit_20;
}

void ModbusControl::setAnyLocation_Compensate_UpLimit_20(const QString &newAnyLocation_Compensate_UpLimit_20)
{
    if (m_AnyLocation_Compensate_UpLimit_20 == newAnyLocation_Compensate_UpLimit_20)
        return;
    m_AnyLocation_Compensate_UpLimit_20 = newAnyLocation_Compensate_UpLimit_20;
    emit AnyLocation_Compensate_UpLimit_20Changed();
}

QString ModbusControl::AnyLocation_Compensate_20() const
{
    return m_AnyLocation_Compensate_20;
}

void ModbusControl::setAnyLocation_Compensate_20(const QString &newAnyLocation_Compensate_20)
{
    if (m_AnyLocation_Compensate_20 == newAnyLocation_Compensate_20)
        return;
    m_AnyLocation_Compensate_20 = newAnyLocation_Compensate_20;
    emit AnyLocation_Compensate_20Changed();
}

bool ModbusControl::AnyLocation_State01() const
{
    return m_AnyLocation_State01;
}

void ModbusControl::setAnyLocation_State01(bool newAnyLocation_State01)
{
    if (m_AnyLocation_State01 == newAnyLocation_State01)
        return;
    m_AnyLocation_State01 = newAnyLocation_State01;
    emit AnyLocation_State01Changed();
}

bool ModbusControl::AnyLocation_State02() const
{
    return m_AnyLocation_State02;
}

void ModbusControl::setAnyLocation_State02(bool newAnyLocation_State02)
{
    if (m_AnyLocation_State02 == newAnyLocation_State02)
        return;
    m_AnyLocation_State02 = newAnyLocation_State02;
    emit AnyLocation_State02Changed();
}

bool ModbusControl::AnyLocation_State03() const
{
    return m_AnyLocation_State03;
}

void ModbusControl::setAnyLocation_State03(bool newAnyLocation_State03)
{
    if (m_AnyLocation_State03 == newAnyLocation_State03)
        return;
    m_AnyLocation_State03 = newAnyLocation_State03;
    emit AnyLocation_State03Changed();
}

bool ModbusControl::AnyLocation_State04() const
{
    return m_AnyLocation_State04;
}

void ModbusControl::setAnyLocation_State04(bool newAnyLocation_State04)
{
    if (m_AnyLocation_State04 == newAnyLocation_State04)
        return;
    m_AnyLocation_State04 = newAnyLocation_State04;
    emit AnyLocation_State04Changed();
}

bool ModbusControl::AnyLocation_State05() const
{
    return m_AnyLocation_State05;
}

void ModbusControl::setAnyLocation_State05(bool newAnyLocation_State05)
{
    if (m_AnyLocation_State05 == newAnyLocation_State05)
        return;
    m_AnyLocation_State05 = newAnyLocation_State05;
    emit AnyLocation_State05Changed();
}

bool ModbusControl::AnyLocation_State06() const
{
    return m_AnyLocation_State06;
}

void ModbusControl::setAnyLocation_State06(bool newAnyLocation_State06)
{
    if (m_AnyLocation_State06 == newAnyLocation_State06)
        return;
    m_AnyLocation_State06 = newAnyLocation_State06;
    emit AnyLocation_State06Changed();
}

bool ModbusControl::AnyLocation_State07() const
{
    return m_AnyLocation_State07;
}

void ModbusControl::setAnyLocation_State07(bool newAnyLocation_State07)
{
    if (m_AnyLocation_State07 == newAnyLocation_State07)
        return;
    m_AnyLocation_State07 = newAnyLocation_State07;
    emit AnyLocation_State07Changed();
}

bool ModbusControl::AnyLocation_State08() const
{
    return m_AnyLocation_State08;
}

void ModbusControl::setAnyLocation_State08(bool newAnyLocation_State08)
{
    if (m_AnyLocation_State08 == newAnyLocation_State08)
        return;
    m_AnyLocation_State08 = newAnyLocation_State08;
    emit AnyLocation_State08Changed();
}

bool ModbusControl::AnyLocation_State09() const
{
    return m_AnyLocation_State09;
}

void ModbusControl::setAnyLocation_State09(bool newAnyLocation_State09)
{
    if (m_AnyLocation_State09 == newAnyLocation_State09)
        return;
    m_AnyLocation_State09 = newAnyLocation_State09;
    emit AnyLocation_State09Changed();
}

bool ModbusControl::AnyLocation_State10() const
{
    return m_AnyLocation_State10;
}

void ModbusControl::setAnyLocation_State10(bool newAnyLocation_State10)
{
    if (m_AnyLocation_State10 == newAnyLocation_State10)
        return;
    m_AnyLocation_State10 = newAnyLocation_State10;
    emit AnyLocation_State10Changed();
}

bool ModbusControl::AnyLocation_State11() const
{
    return m_AnyLocation_State11;
}

void ModbusControl::setAnyLocation_State11(bool newAnyLocation_State11)
{
    if (m_AnyLocation_State11 == newAnyLocation_State11)
        return;
    m_AnyLocation_State11 = newAnyLocation_State11;
    emit AnyLocation_State11Changed();
}

bool ModbusControl::AnyLocation_State12() const
{
    return m_AnyLocation_State12;
}

void ModbusControl::setAnyLocation_State12(bool newAnyLocation_State12)
{
    if (m_AnyLocation_State12 == newAnyLocation_State12)
        return;
    m_AnyLocation_State12 = newAnyLocation_State12;
    emit AnyLocation_State12Changed();
}

bool ModbusControl::AnyLocation_State13() const
{
    return m_AnyLocation_State13;
}

void ModbusControl::setAnyLocation_State13(bool newAnyLocation_State13)
{
    if (m_AnyLocation_State13 == newAnyLocation_State13)
        return;
    m_AnyLocation_State13 = newAnyLocation_State13;
    emit AnyLocation_State13Changed();
}

bool ModbusControl::AnyLocation_State14() const
{
    return m_AnyLocation_State14;
}

void ModbusControl::setAnyLocation_State14(bool newAnyLocation_State14)
{
    if (m_AnyLocation_State14 == newAnyLocation_State14)
        return;
    m_AnyLocation_State14 = newAnyLocation_State14;
    emit AnyLocation_State14Changed();
}

bool ModbusControl::AnyLocation_State15() const
{
    return m_AnyLocation_State15;
}

void ModbusControl::setAnyLocation_State15(bool newAnyLocation_State15)
{
    if (m_AnyLocation_State15 == newAnyLocation_State15)
        return;
    m_AnyLocation_State15 = newAnyLocation_State15;
    emit AnyLocation_State15Changed();
}

bool ModbusControl::AnyLocation_State16() const
{
    return m_AnyLocation_State16;
}

void ModbusControl::setAnyLocation_State16(bool newAnyLocation_State16)
{
    if (m_AnyLocation_State16 == newAnyLocation_State16)
        return;
    m_AnyLocation_State16 = newAnyLocation_State16;
    emit AnyLocation_State16Changed();
}

bool ModbusControl::AnyLocation_State17() const
{
    return m_AnyLocation_State17;
}

void ModbusControl::setAnyLocation_State17(bool newAnyLocation_State17)
{
    if (m_AnyLocation_State17 == newAnyLocation_State17)
        return;
    m_AnyLocation_State17 = newAnyLocation_State17;
    emit AnyLocation_State17Changed();
}

bool ModbusControl::AnyLocation_State18() const
{
    return m_AnyLocation_State18;
}

void ModbusControl::setAnyLocation_State18(bool newAnyLocation_State18)
{
    if (m_AnyLocation_State18 == newAnyLocation_State18)
        return;
    m_AnyLocation_State18 = newAnyLocation_State18;
    emit AnyLocation_State18Changed();
}

bool ModbusControl::AnyLocation_State19() const
{
    return m_AnyLocation_State19;
}

void ModbusControl::setAnyLocation_State19(bool newAnyLocation_State19)
{
    if (m_AnyLocation_State19 == newAnyLocation_State19)
        return;
    m_AnyLocation_State19 = newAnyLocation_State19;
    emit AnyLocation_State19Changed();
}

bool ModbusControl::AnyLocation_State20() const
{
    return m_AnyLocation_State20;
}

void ModbusControl::setAnyLocation_State20(bool newAnyLocation_State20)
{
    if (m_AnyLocation_State20 == newAnyLocation_State20)
        return;
    m_AnyLocation_State20 = newAnyLocation_State20;
    emit AnyLocation_State20Changed();
}

bool ModbusControl::IO_X0() const
{
    return m_IO_X0;
}

void ModbusControl::setIO_X0(bool newIO_X0)
{
    if (m_IO_X0 == newIO_X0)
        return;
    m_IO_X0 = newIO_X0;
    emit IO_X0Changed();
}

bool ModbusControl::IO_X1() const
{
    return m_IO_X1;
}

void ModbusControl::setIO_X1(bool newIO_X1)
{
    if (m_IO_X1 == newIO_X1)
        return;
    m_IO_X1 = newIO_X1;
    emit IO_X1Changed();
}

bool ModbusControl::IO_X2() const
{
    return m_IO_X2;
}

void ModbusControl::setIO_X2(bool newIO_X2)
{
    if (m_IO_X2 == newIO_X2)
        return;
    m_IO_X2 = newIO_X2;
    emit IO_X2Changed();
}

bool ModbusControl::IO_X3() const
{
    return m_IO_X3;
}

void ModbusControl::setIO_X3(bool newIO_X3)
{
    if (m_IO_X3 == newIO_X3)
        return;
    m_IO_X3 = newIO_X3;
    emit IO_X3Changed();
}

bool ModbusControl::IO_X5() const
{
    return m_IO_X5;
}

void ModbusControl::setIO_X5(bool newIO_X5)
{
    if (m_IO_X5 == newIO_X5)
        return;
    m_IO_X5 = newIO_X5;
    emit IO_X5Changed();
}

bool ModbusControl::IO_X6() const
{
    return m_IO_X6;
}

void ModbusControl::setIO_X6(bool newIO_X6)
{
    if (m_IO_X6 == newIO_X6)
        return;
    m_IO_X6 = newIO_X6;
    emit IO_X6Changed();
}

bool ModbusControl::IO_X7() const
{
    return m_IO_X7;
}

void ModbusControl::setIO_X7(bool newIO_X7)
{
    if (m_IO_X7 == newIO_X7)
        return;
    m_IO_X7 = newIO_X7;
    emit IO_X7Changed();
}

bool ModbusControl::IO_X10() const
{
    return m_IO_X10;
}

void ModbusControl::setIO_X10(bool newIO_X10)
{
    if (m_IO_X10 == newIO_X10)
        return;
    m_IO_X10 = newIO_X10;
    emit IO_X10Changed();
}

bool ModbusControl::IO_X11() const
{
    return m_IO_X11;
}

void ModbusControl::setIO_X11(bool newIO_X11)
{
    if (m_IO_X11 == newIO_X11)
        return;
    m_IO_X11 = newIO_X11;
    emit IO_X11Changed();
}

bool ModbusControl::IO_X16() const
{
    return m_IO_X16;
}

void ModbusControl::setIO_X16(bool newIO_X16)
{
    if (m_IO_X16 == newIO_X16)
        return;
    m_IO_X16 = newIO_X16;
    emit IO_X16Changed();
}

bool ModbusControl::IO_X17() const
{
    return m_IO_X17;
}

void ModbusControl::setIO_X17(bool newIO_X17)
{
    if (m_IO_X17 == newIO_X17)
        return;
    m_IO_X17 = newIO_X17;
    emit IO_X17Changed();
}

bool ModbusControl::IO_X20() const
{
    return m_IO_X20;
}

void ModbusControl::setIO_X20(bool newIO_X20)
{
    if (m_IO_X20 == newIO_X20)
        return;
    m_IO_X20 = newIO_X20;
    emit IO_X20Changed();
}

bool ModbusControl::IO_X21() const
{
    return m_IO_X21;
}

void ModbusControl::setIO_X21(bool newIO_X21)
{
    if (m_IO_X21 == newIO_X21)
        return;
    m_IO_X21 = newIO_X21;
    emit IO_X21Changed();
}

bool ModbusControl::IO_X22() const
{
    return m_IO_X22;
}

void ModbusControl::setIO_X22(bool newIO_X22)
{
    if (m_IO_X22 == newIO_X22)
        return;
    m_IO_X22 = newIO_X22;
    emit IO_X22Changed();
}

bool ModbusControl::IO_X23() const
{
    return m_IO_X23;
}

void ModbusControl::setIO_X23(bool newIO_X23)
{
    if (m_IO_X23 == newIO_X23)
        return;
    m_IO_X23 = newIO_X23;
    emit IO_X23Changed();
}

bool ModbusControl::IO_X24() const
{
    return m_IO_X24;
}

void ModbusControl::setIO_X24(bool newIO_X24)
{
    if (m_IO_X24 == newIO_X24)
        return;
    m_IO_X24 = newIO_X24;
    emit IO_X24Changed();
}

bool ModbusControl::IO_X25() const
{
    return m_IO_X25;
}

void ModbusControl::setIO_X25(bool newIO_X25)
{
    if (m_IO_X25 == newIO_X25)
        return;
    m_IO_X25 = newIO_X25;
    emit IO_X25Changed();
}

bool ModbusControl::IO_Y0() const
{
    return m_IO_Y0;
}

void ModbusControl::setIO_Y0(bool newIO_Y0)
{
    if (m_IO_Y0 == newIO_Y0)
        return;
    m_IO_Y0 = newIO_Y0;
    emit IO_Y0Changed();
}

bool ModbusControl::IO_Y1() const
{
    return m_IO_Y1;
}

void ModbusControl::setIO_Y1(bool newIO_Y1)
{
    if (m_IO_Y1 == newIO_Y1)
        return;
    m_IO_Y1 = newIO_Y1;
    emit IO_Y1Changed();
}

bool ModbusControl::IO_Y2() const
{
    return m_IO_Y2;
}

void ModbusControl::setIO_Y2(bool newIO_Y2)
{
    if (m_IO_Y2 == newIO_Y2)
        return;
    m_IO_Y2 = newIO_Y2;
    emit IO_Y2Changed();
}

bool ModbusControl::IO_Y3() const
{
    return m_IO_Y3;
}

void ModbusControl::setIO_Y3(bool newIO_Y3)
{
    if (m_IO_Y3 == newIO_Y3)
        return;
    m_IO_Y3 = newIO_Y3;
    emit IO_Y3Changed();
}

bool ModbusControl::IO_Y4() const
{
    return m_IO_Y4;
}

void ModbusControl::setIO_Y4(bool newIO_Y4)
{
    if (m_IO_Y4 == newIO_Y4)
        return;
    m_IO_Y4 = newIO_Y4;
    emit IO_Y4Changed();
}

bool ModbusControl::IO_Y5() const
{
    return m_IO_Y5;
}

void ModbusControl::setIO_Y5(bool newIO_Y5)
{
    if (m_IO_Y5 == newIO_Y5)
        return;
    m_IO_Y5 = newIO_Y5;
    emit IO_Y5Changed();
}

bool ModbusControl::IO_Y6() const
{
    return m_IO_Y6;
}

void ModbusControl::setIO_Y6(bool newIO_Y6)
{
    if (m_IO_Y6 == newIO_Y6)
        return;
    m_IO_Y6 = newIO_Y6;
    emit IO_Y6Changed();
}

bool ModbusControl::IO_Y7() const
{
    return m_IO_Y7;
}

void ModbusControl::setIO_Y7(bool newIO_Y7)
{
    if (m_IO_Y7 == newIO_Y7)
        return;
    m_IO_Y7 = newIO_Y7;
    emit IO_Y7Changed();
}

bool ModbusControl::IO_Y10() const
{
    return m_IO_Y10;
}

void ModbusControl::setIO_Y10(bool newIO_Y10)
{
    if (m_IO_Y10 == newIO_Y10)
        return;
    m_IO_Y10 = newIO_Y10;
    emit IO_Y10Changed();
}

bool ModbusControl::IO_Y11() const
{
    return m_IO_Y11;
}

void ModbusControl::setIO_Y11(bool newIO_Y11)
{
    if (m_IO_Y11 == newIO_Y11)
        return;
    m_IO_Y11 = newIO_Y11;
    emit IO_Y11Changed();
}

bool ModbusControl::IO_Y12() const
{
    return m_IO_Y12;
}

void ModbusControl::setIO_Y12(bool newIO_Y12)
{
    if (m_IO_Y12 == newIO_Y12)
        return;
    m_IO_Y12 = newIO_Y12;
    emit IO_Y12Changed();
}

bool ModbusControl::IO_Y13() const
{
    return m_IO_Y13;
}

void ModbusControl::setIO_Y13(bool newIO_Y13)
{
    if (m_IO_Y13 == newIO_Y13)
        return;
    m_IO_Y13 = newIO_Y13;
    emit IO_Y13Changed();
}

bool ModbusControl::IO_Y14() const
{
    return m_IO_Y14;
}

void ModbusControl::setIO_Y14(bool newIO_Y14)
{
    if (m_IO_Y14 == newIO_Y14)
        return;
    m_IO_Y14 = newIO_Y14;
    emit IO_Y14Changed();
}

bool ModbusControl::IO_Y20() const
{
    return m_IO_Y20;
}

void ModbusControl::setIO_Y20(bool newIO_Y20)
{
    if (m_IO_Y20 == newIO_Y20)
        return;
    m_IO_Y20 = newIO_Y20;
    emit IO_Y20Changed();
}

bool ModbusControl::IO_Y21() const
{
    return m_IO_Y21;
}

void ModbusControl::setIO_Y21(bool newIO_Y21)
{
    if (m_IO_Y21 == newIO_Y21)
        return;
    m_IO_Y21 = newIO_Y21;
    emit IO_Y21Changed();
}

bool ModbusControl::IO_Y22() const
{
    return m_IO_Y22;
}

void ModbusControl::setIO_Y22(bool newIO_Y22)
{
    if (m_IO_Y22 == newIO_Y22)
        return;
    m_IO_Y22 = newIO_Y22;
    emit IO_Y22Changed();
}

bool ModbusControl::IO_Y23() const
{
    return m_IO_Y23;
}

void ModbusControl::setIO_Y23(bool newIO_Y23)
{
    if (m_IO_Y23 == newIO_Y23)
        return;
    m_IO_Y23 = newIO_Y23;
    emit IO_Y23Changed();
}

bool ModbusControl::IO_Y24() const
{
    return m_IO_Y24;
}

void ModbusControl::setIO_Y24(bool newIO_Y24)
{
    if (m_IO_Y24 == newIO_Y24)
        return;
    m_IO_Y24 = newIO_Y24;
    emit IO_Y24Changed();
}

bool ModbusControl::IO_Y25() const
{
    return m_IO_Y25;
}

void ModbusControl::setIO_Y25(bool newIO_Y25)
{
    if (m_IO_Y25 == newIO_Y25)
        return;
    m_IO_Y25 = newIO_Y25;
    emit IO_Y25Changed();
}

QString ModbusControl::OrderNumber_OrderProcess() const
{
    return m_OrderNumber_OrderProcess;
}

void ModbusControl::setOrderNumber_OrderProcess(const QString &newOrderNumber_OrderProcess)
{
    if (m_OrderNumber_OrderProcess == newOrderNumber_OrderProcess)
        return;
    m_OrderNumber_OrderProcess = newOrderNumber_OrderProcess;
    emit OrderNumber_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_01_OrderProcess() const
{
    return m_WorkedCount_01_OrderProcess;
}

void ModbusControl::setWorkedCount_01_OrderProcess(const QString &newWorkedCount_01_OrderProcess)
{
    if (m_WorkedCount_01_OrderProcess == newWorkedCount_01_OrderProcess)
        return;
    m_WorkedCount_01_OrderProcess = newWorkedCount_01_OrderProcess;
    emit WorkedCount_01_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_02_OrderProcess() const
{
    return m_WorkedCount_02_OrderProcess;
}

void ModbusControl::setWorkedCount_02_OrderProcess(const QString &newWorkedCount_02_OrderProcess)
{
    if (m_WorkedCount_02_OrderProcess == newWorkedCount_02_OrderProcess)
        return;
    m_WorkedCount_02_OrderProcess = newWorkedCount_02_OrderProcess;
    emit WorkedCount_02_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_03_OrderProcess() const
{
    return m_WorkedCount_03_OrderProcess;
}

void ModbusControl::setWorkedCount_03_OrderProcess(const QString &newWorkedCount_03_OrderProcess)
{
    if (m_WorkedCount_03_OrderProcess == newWorkedCount_03_OrderProcess)
        return;
    m_WorkedCount_03_OrderProcess = newWorkedCount_03_OrderProcess;
    emit WorkedCount_03_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_04_OrderProcess() const
{
    return m_WorkedCount_04_OrderProcess;
}

void ModbusControl::setWorkedCount_04_OrderProcess(const QString &newWorkedCount_04_OrderProcess)
{
    if (m_WorkedCount_04_OrderProcess == newWorkedCount_04_OrderProcess)
        return;
    m_WorkedCount_04_OrderProcess = newWorkedCount_04_OrderProcess;
    emit WorkedCount_04_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_05_OrderProcess() const
{
    return m_WorkedCount_05_OrderProcess;
}

void ModbusControl::setWorkedCount_05_OrderProcess(const QString &newWorkedCount_05_OrderProcess)
{
    if (m_WorkedCount_05_OrderProcess == newWorkedCount_05_OrderProcess)
        return;
    m_WorkedCount_05_OrderProcess = newWorkedCount_05_OrderProcess;
    emit WorkedCount_05_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_06_OrderProcess() const
{
    return m_WorkedCount_06_OrderProcess;
}

void ModbusControl::setWorkedCount_06_OrderProcess(const QString &newWorkedCount_06_OrderProcess)
{
    if (m_WorkedCount_06_OrderProcess == newWorkedCount_06_OrderProcess)
        return;
    m_WorkedCount_06_OrderProcess = newWorkedCount_06_OrderProcess;
    emit WorkedCount_06_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_07_OrderProcess() const
{
    return m_WorkedCount_07_OrderProcess;
}

void ModbusControl::setWorkedCount_07_OrderProcess(const QString &newWorkedCount_07_OrderProcess)
{
    if (m_WorkedCount_07_OrderProcess == newWorkedCount_07_OrderProcess)
        return;
    m_WorkedCount_07_OrderProcess = newWorkedCount_07_OrderProcess;
    emit WorkedCount_07_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_08_OrderProcess() const
{
    return m_WorkedCount_08_OrderProcess;
}

void ModbusControl::setWorkedCount_08_OrderProcess(const QString &newWorkedCount_08_OrderProcess)
{
    if (m_WorkedCount_08_OrderProcess == newWorkedCount_08_OrderProcess)
        return;
    m_WorkedCount_08_OrderProcess = newWorkedCount_08_OrderProcess;
    emit WorkedCount_08_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_09_OrderProcess() const
{
    return m_WorkedCount_09_OrderProcess;
}

void ModbusControl::setWorkedCount_09_OrderProcess(const QString &newWorkedCount_09_OrderProcess)
{
    if (m_WorkedCount_09_OrderProcess == newWorkedCount_09_OrderProcess)
        return;
    m_WorkedCount_09_OrderProcess = newWorkedCount_09_OrderProcess;
    emit WorkedCount_09_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_10_OrderProcess() const
{
    return m_WorkedCount_10_OrderProcess;
}

void ModbusControl::setWorkedCount_10_OrderProcess(const QString &newWorkedCount_10_OrderProcess)
{
    if (m_WorkedCount_10_OrderProcess == newWorkedCount_10_OrderProcess)
        return;
    m_WorkedCount_10_OrderProcess = newWorkedCount_10_OrderProcess;
    emit WorkedCount_10_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_11_OrderProcess() const
{
    return m_WorkedCount_11_OrderProcess;
}

void ModbusControl::setWorkedCount_11_OrderProcess(const QString &newWorkedCount_11_OrderProcess)
{
    if (m_WorkedCount_11_OrderProcess == newWorkedCount_11_OrderProcess)
        return;
    m_WorkedCount_11_OrderProcess = newWorkedCount_11_OrderProcess;
    emit WorkedCount_11_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_12_OrderProcess() const
{
    return m_WorkedCount_12_OrderProcess;
}

void ModbusControl::setWorkedCount_12_OrderProcess(const QString &newWorkedCount_12_OrderProcess)
{
    if (m_WorkedCount_12_OrderProcess == newWorkedCount_12_OrderProcess)
        return;
    m_WorkedCount_12_OrderProcess = newWorkedCount_12_OrderProcess;
    emit WorkedCount_12_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_13_OrderProcess() const
{
    return m_WorkedCount_13_OrderProcess;
}

void ModbusControl::setWorkedCount_13_OrderProcess(const QString &newWorkedCount_13_OrderProcess)
{
    if (m_WorkedCount_13_OrderProcess == newWorkedCount_13_OrderProcess)
        return;
    m_WorkedCount_13_OrderProcess = newWorkedCount_13_OrderProcess;
    emit WorkedCount_13_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_14_OrderProcess() const
{
    return m_WorkedCount_14_OrderProcess;
}

void ModbusControl::setWorkedCount_14_OrderProcess(const QString &newWorkedCount_14_OrderProcess)
{
    if (m_WorkedCount_14_OrderProcess == newWorkedCount_14_OrderProcess)
        return;
    m_WorkedCount_14_OrderProcess = newWorkedCount_14_OrderProcess;
    emit WorkedCount_14_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_15_OrderProcess() const
{
    return m_WorkedCount_15_OrderProcess;
}

void ModbusControl::setWorkedCount_15_OrderProcess(const QString &newWorkedCount_15_OrderProcess)
{
    if (m_WorkedCount_15_OrderProcess == newWorkedCount_15_OrderProcess)
        return;
    m_WorkedCount_15_OrderProcess = newWorkedCount_15_OrderProcess;
    emit WorkedCount_15_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_16_OrderProcess() const
{
    return m_WorkedCount_16_OrderProcess;
}

void ModbusControl::setWorkedCount_16_OrderProcess(const QString &newWorkedCount_16_OrderProcess)
{
    if (m_WorkedCount_16_OrderProcess == newWorkedCount_16_OrderProcess)
        return;
    m_WorkedCount_16_OrderProcess = newWorkedCount_16_OrderProcess;
    emit WorkedCount_16_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_17_OrderProcess() const
{
    return m_WorkedCount_17_OrderProcess;
}

void ModbusControl::setWorkedCount_17_OrderProcess(const QString &newWorkedCount_17_OrderProcess)
{
    if (m_WorkedCount_17_OrderProcess == newWorkedCount_17_OrderProcess)
        return;
    m_WorkedCount_17_OrderProcess = newWorkedCount_17_OrderProcess;
    emit WorkedCount_17_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_18_OrderProcess() const
{
    return m_WorkedCount_18_OrderProcess;
}

void ModbusControl::setWorkedCount_18_OrderProcess(const QString &newWorkedCount_18_OrderProcess)
{
    if (m_WorkedCount_18_OrderProcess == newWorkedCount_18_OrderProcess)
        return;
    m_WorkedCount_18_OrderProcess = newWorkedCount_18_OrderProcess;
    emit WorkedCount_18_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_19_OrderProcess() const
{
    return m_WorkedCount_19_OrderProcess;
}

void ModbusControl::setWorkedCount_19_OrderProcess(const QString &newWorkedCount_19_OrderProcess)
{
    if (m_WorkedCount_19_OrderProcess == newWorkedCount_19_OrderProcess)
        return;
    m_WorkedCount_19_OrderProcess = newWorkedCount_19_OrderProcess;
    emit WorkedCount_19_OrderProcessChanged();
}

QString ModbusControl::WorkedCount_20_OrderProcess() const
{
    return m_WorkedCount_20_OrderProcess;
}

void ModbusControl::setWorkedCount_20_OrderProcess(const QString &newWorkedCount_20_OrderProcess)
{
    if (m_WorkedCount_20_OrderProcess == newWorkedCount_20_OrderProcess)
        return;
    m_WorkedCount_20_OrderProcess = newWorkedCount_20_OrderProcess;
    emit WorkedCount_20_OrderProcessChanged();
}

QString ModbusControl::OrderNumber_ListProcess() const
{
    return m_OrderNumber_ListProcess;
}

void ModbusControl::setOrderNumber_ListProcess(const QString &newOrderNumber_ListProcess)
{
    if (m_OrderNumber_ListProcess == newOrderNumber_ListProcess)
        return;
    m_OrderNumber_ListProcess = newOrderNumber_ListProcess;
    emit OrderNumber_ListProcessChanged();
}

QString ModbusControl::MaterialLength01_ListProcess() const
{
    return m_MaterialLength01_ListProcess;
}

void ModbusControl::setMaterialLength01_ListProcess(const QString &newMaterialLength01_ListProcess)
{
    if (m_MaterialLength01_ListProcess == newMaterialLength01_ListProcess)
        return;
    m_MaterialLength01_ListProcess = newMaterialLength01_ListProcess;
    emit MaterialLength01_ListProcessChanged();
}

QString ModbusControl::MaterialLength02_ListProcess() const
{
    return m_MaterialLength02_ListProcess;
}

void ModbusControl::setMaterialLength02_ListProcess(const QString &newMaterialLength02_ListProcess)
{
    if (m_MaterialLength02_ListProcess == newMaterialLength02_ListProcess)
        return;
    m_MaterialLength02_ListProcess = newMaterialLength02_ListProcess;
    emit MaterialLength02_ListProcessChanged();
}

QString ModbusControl::MaterialLength03_ListProcess() const
{
    return m_MaterialLength03_ListProcess;
}

void ModbusControl::setMaterialLength03_ListProcess(const QString &newMaterialLength03_ListProcess)
{
    if (m_MaterialLength03_ListProcess == newMaterialLength03_ListProcess)
        return;
    m_MaterialLength03_ListProcess = newMaterialLength03_ListProcess;
    emit MaterialLength03_ListProcessChanged();
}

QString ModbusControl::MaterialLength04_ListProcess() const
{
    return m_MaterialLength04_ListProcess;
}

void ModbusControl::setMaterialLength04_ListProcess(const QString &newMaterialLength04_ListProcess)
{
    if (m_MaterialLength04_ListProcess == newMaterialLength04_ListProcess)
        return;
    m_MaterialLength04_ListProcess = newMaterialLength04_ListProcess;
    emit MaterialLength04_ListProcessChanged();
}

QString ModbusControl::MaterialLength05_ListProcess() const
{
    return m_MaterialLength05_ListProcess;
}

void ModbusControl::setMaterialLength05_ListProcess(const QString &newMaterialLength05_ListProcess)
{
    if (m_MaterialLength05_ListProcess == newMaterialLength05_ListProcess)
        return;
    m_MaterialLength05_ListProcess = newMaterialLength05_ListProcess;
    emit MaterialLength05_ListProcessChanged();
}

QString ModbusControl::MaterialLength06_ListProcess() const
{
    return m_MaterialLength06_ListProcess;
}

void ModbusControl::setMaterialLength06_ListProcess(const QString &newMaterialLength06_ListProcess)
{
    if (m_MaterialLength06_ListProcess == newMaterialLength06_ListProcess)
        return;
    m_MaterialLength06_ListProcess = newMaterialLength06_ListProcess;
    emit MaterialLength06_ListProcessChanged();
}

QString ModbusControl::MaterialLength07_ListProcess() const
{
    return m_MaterialLength07_ListProcess;
}

void ModbusControl::setMaterialLength07_ListProcess(const QString &newMaterialLength07_ListProcess)
{
    if (m_MaterialLength07_ListProcess == newMaterialLength07_ListProcess)
        return;
    m_MaterialLength07_ListProcess = newMaterialLength07_ListProcess;
    emit MaterialLength07_ListProcessChanged();
}

QString ModbusControl::MaterialLength08_ListProcess() const
{
    return m_MaterialLength08_ListProcess;
}

void ModbusControl::setMaterialLength08_ListProcess(const QString &newMaterialLength08_ListProcess)
{
    if (m_MaterialLength08_ListProcess == newMaterialLength08_ListProcess)
        return;
    m_MaterialLength08_ListProcess = newMaterialLength08_ListProcess;
    emit MaterialLength08_ListProcessChanged();
}

QString ModbusControl::MaterialLength09_ListProcess() const
{
    return m_MaterialLength09_ListProcess;
}

void ModbusControl::setMaterialLength09_ListProcess(const QString &newMaterialLength09_ListProcess)
{
    if (m_MaterialLength09_ListProcess == newMaterialLength09_ListProcess)
        return;
    m_MaterialLength09_ListProcess = newMaterialLength09_ListProcess;
    emit MaterialLength09_ListProcessChanged();
}

QString ModbusControl::MaterialLength10_ListProcess() const
{
    return m_MaterialLength10_ListProcess;
}

void ModbusControl::setMaterialLength10_ListProcess(const QString &newMaterialLength10_ListProcess)
{
    if (m_MaterialLength10_ListProcess == newMaterialLength10_ListProcess)
        return;
    m_MaterialLength10_ListProcess = newMaterialLength10_ListProcess;
    emit MaterialLength10_ListProcessChanged();
}

QString ModbusControl::MaterialLength11_ListProcess() const
{
    return m_MaterialLength11_ListProcess;
}

void ModbusControl::setMaterialLength11_ListProcess(const QString &newMaterialLength11_ListProcess)
{
    if (m_MaterialLength11_ListProcess == newMaterialLength11_ListProcess)
        return;
    m_MaterialLength11_ListProcess = newMaterialLength11_ListProcess;
    emit MaterialLength11_ListProcessChanged();
}

QString ModbusControl::MaterialLength12_ListProcess() const
{
    return m_MaterialLength12_ListProcess;
}

void ModbusControl::setMaterialLength12_ListProcess(const QString &newMaterialLength12_ListProcess)
{
    if (m_MaterialLength12_ListProcess == newMaterialLength12_ListProcess)
        return;
    m_MaterialLength12_ListProcess = newMaterialLength12_ListProcess;
    emit MaterialLength12_ListProcessChanged();
}

QString ModbusControl::MaterialLength13_ListProcess() const
{
    return m_MaterialLength13_ListProcess;
}

void ModbusControl::setMaterialLength13_ListProcess(const QString &newMaterialLength13_ListProcess)
{
    if (m_MaterialLength13_ListProcess == newMaterialLength13_ListProcess)
        return;
    m_MaterialLength13_ListProcess = newMaterialLength13_ListProcess;
    emit MaterialLength13_ListProcessChanged();
}

QString ModbusControl::MaterialLength14_ListProcess() const
{
    return m_MaterialLength14_ListProcess;
}

void ModbusControl::setMaterialLength14_ListProcess(const QString &newMaterialLength14_ListProcess)
{
    if (m_MaterialLength14_ListProcess == newMaterialLength14_ListProcess)
        return;
    m_MaterialLength14_ListProcess = newMaterialLength14_ListProcess;
    emit MaterialLength14_ListProcessChanged();
}

QString ModbusControl::MaterialLength15_ListProcess() const
{
    return m_MaterialLength15_ListProcess;
}

void ModbusControl::setMaterialLength15_ListProcess(const QString &newMaterialLength15_ListProcess)
{
    if (m_MaterialLength15_ListProcess == newMaterialLength15_ListProcess)
        return;
    m_MaterialLength15_ListProcess = newMaterialLength15_ListProcess;
    emit MaterialLength15_ListProcessChanged();
}

QString ModbusControl::MaterialLength16_ListProcess() const
{
    return m_MaterialLength16_ListProcess;
}

void ModbusControl::setMaterialLength16_ListProcess(const QString &newMaterialLength16_ListProcess)
{
    if (m_MaterialLength16_ListProcess == newMaterialLength16_ListProcess)
        return;
    m_MaterialLength16_ListProcess = newMaterialLength16_ListProcess;
    emit MaterialLength16_ListProcessChanged();
}

QString ModbusControl::MaterialLength17_ListProcess() const
{
    return m_MaterialLength17_ListProcess;
}

void ModbusControl::setMaterialLength17_ListProcess(const QString &newMaterialLength17_ListProcess)
{
    if (m_MaterialLength17_ListProcess == newMaterialLength17_ListProcess)
        return;
    m_MaterialLength17_ListProcess = newMaterialLength17_ListProcess;
    emit MaterialLength17_ListProcessChanged();
}

QString ModbusControl::MaterialLength18_ListProcess() const
{
    return m_MaterialLength18_ListProcess;
}

void ModbusControl::setMaterialLength18_ListProcess(const QString &newMaterialLength18_ListProcess)
{
    if (m_MaterialLength18_ListProcess == newMaterialLength18_ListProcess)
        return;
    m_MaterialLength18_ListProcess = newMaterialLength18_ListProcess;
    emit MaterialLength18_ListProcessChanged();
}

QString ModbusControl::MaterialLength19_ListProcess() const
{
    return m_MaterialLength19_ListProcess;
}

void ModbusControl::setMaterialLength19_ListProcess(const QString &newMaterialLength19_ListProcess)
{
    if (m_MaterialLength19_ListProcess == newMaterialLength19_ListProcess)
        return;
    m_MaterialLength19_ListProcess = newMaterialLength19_ListProcess;
    emit MaterialLength19_ListProcessChanged();
}

QString ModbusControl::MaterialLength20_ListProcess() const
{
    return m_MaterialLength20_ListProcess;
}

void ModbusControl::setMaterialLength20_ListProcess(const QString &newMaterialLength20_ListProcess)
{
    if (m_MaterialLength20_ListProcess == newMaterialLength20_ListProcess)
        return;
    m_MaterialLength20_ListProcess = newMaterialLength20_ListProcess;
    emit MaterialLength20_ListProcessChanged();
}

QString ModbusControl::LeftAngle_01_ListProcess() const
{
    return m_LeftAngle_01_ListProcess;
}

void ModbusControl::setLeftAngle_01_ListProcess(const QString &newLeftAngle_01_ListProcess)
{
    if (m_LeftAngle_01_ListProcess == newLeftAngle_01_ListProcess)
        return;
    m_LeftAngle_01_ListProcess = newLeftAngle_01_ListProcess;
    emit LeftAngle_01_ListProcessChanged();
}

QString ModbusControl::RightAngle_01_ListProcess() const
{
    return m_RightAngle_01_ListProcess;
}

void ModbusControl::setRightAngle_01_ListProcess(const QString &newRightAngle_01_ListProcess)
{
    if (m_RightAngle_01_ListProcess == newRightAngle_01_ListProcess)
        return;
    m_RightAngle_01_ListProcess = newRightAngle_01_ListProcess;
    emit RightAngle_01_ListProcessChanged();
}

QString ModbusControl::LeftAngle_02_ListProcess() const
{
    return m_LeftAngle_02_ListProcess;
}

void ModbusControl::setLeftAngle_02_ListProcess(const QString &newLeftAngle_02_ListProcess)
{
    if (m_LeftAngle_02_ListProcess == newLeftAngle_02_ListProcess)
        return;
    m_LeftAngle_02_ListProcess = newLeftAngle_02_ListProcess;
    emit LeftAngle_02_ListProcessChanged();
}

QString ModbusControl::RightAngle_02_ListProcess() const
{
    return m_RightAngle_02_ListProcess;
}

void ModbusControl::setRightAngle_02_ListProcess(const QString &newRightAngle_02_ListProcess)
{
    if (m_RightAngle_02_ListProcess == newRightAngle_02_ListProcess)
        return;
    m_RightAngle_02_ListProcess = newRightAngle_02_ListProcess;
    emit RightAngle_02_ListProcessChanged();
}

QString ModbusControl::LeftAngle_03_ListProcess() const
{
    return m_LeftAngle_03_ListProcess;
}

void ModbusControl::setLeftAngle_03_ListProcess(const QString &newLeftAngle_03_ListProcess)
{
    if (m_LeftAngle_03_ListProcess == newLeftAngle_03_ListProcess)
        return;
    m_LeftAngle_03_ListProcess = newLeftAngle_03_ListProcess;
    emit LeftAngle_03_ListProcessChanged();
}

QString ModbusControl::RightAngle_03_ListProcess() const
{
    return m_RightAngle_03_ListProcess;
}

void ModbusControl::setRightAngle_03_ListProcess(const QString &newRightAngle_03_ListProcess)
{
    if (m_RightAngle_03_ListProcess == newRightAngle_03_ListProcess)
        return;
    m_RightAngle_03_ListProcess = newRightAngle_03_ListProcess;
    emit RightAngle_03_ListProcessChanged();
}

QString ModbusControl::LeftAngle_04_ListProcess() const
{
    return m_LeftAngle_04_ListProcess;
}

void ModbusControl::setLeftAngle_04_ListProcess(const QString &newLeftAngle_04_ListProcess)
{
    if (m_LeftAngle_04_ListProcess == newLeftAngle_04_ListProcess)
        return;
    m_LeftAngle_04_ListProcess = newLeftAngle_04_ListProcess;
    emit LeftAngle_04_ListProcessChanged();
}

QString ModbusControl::RightAngle_04_ListProcess() const
{
    return m_RightAngle_04_ListProcess;
}

void ModbusControl::setRightAngle_04_ListProcess(const QString &newRightAngle_04_ListProcess)
{
    if (m_RightAngle_04_ListProcess == newRightAngle_04_ListProcess)
        return;
    m_RightAngle_04_ListProcess = newRightAngle_04_ListProcess;
    emit RightAngle_04_ListProcessChanged();
}

QString ModbusControl::LeftAngle_05_ListProcess() const
{
    return m_LeftAngle_05_ListProcess;
}

void ModbusControl::setLeftAngle_05_ListProcess(const QString &newLeftAngle_05_ListProcess)
{
    if (m_LeftAngle_05_ListProcess == newLeftAngle_05_ListProcess)
        return;
    m_LeftAngle_05_ListProcess = newLeftAngle_05_ListProcess;
    emit LeftAngle_05_ListProcessChanged();
}

QString ModbusControl::RightAngle_05_ListProcess() const
{
    return m_RightAngle_05_ListProcess;
}

void ModbusControl::setRightAngle_05_ListProcess(const QString &newRightAngle_05_ListProcess)
{
    if (m_RightAngle_05_ListProcess == newRightAngle_05_ListProcess)
        return;
    m_RightAngle_05_ListProcess = newRightAngle_05_ListProcess;
    emit RightAngle_05_ListProcessChanged();
}

QString ModbusControl::LeftAngle_06_ListProcess() const
{
    return m_LeftAngle_06_ListProcess;
}

void ModbusControl::setLeftAngle_06_ListProcess(const QString &newLeftAngle_06_ListProcess)
{
    if (m_LeftAngle_06_ListProcess == newLeftAngle_06_ListProcess)
        return;
    m_LeftAngle_06_ListProcess = newLeftAngle_06_ListProcess;
    emit LeftAngle_06_ListProcessChanged();
}

QString ModbusControl::RightAngle_06_ListProcess() const
{
    return m_RightAngle_06_ListProcess;
}

void ModbusControl::setRightAngle_06_ListProcess(const QString &newRightAngle_06_ListProcess)
{
    if (m_RightAngle_06_ListProcess == newRightAngle_06_ListProcess)
        return;
    m_RightAngle_06_ListProcess = newRightAngle_06_ListProcess;
    emit RightAngle_06_ListProcessChanged();
}

QString ModbusControl::LeftAngle_07_ListProcess() const
{
    return m_LeftAngle_07_ListProcess;
}

void ModbusControl::setLeftAngle_07_ListProcess(const QString &newLeftAngle_07_ListProcess)
{
    if (m_LeftAngle_07_ListProcess == newLeftAngle_07_ListProcess)
        return;
    m_LeftAngle_07_ListProcess = newLeftAngle_07_ListProcess;
    emit LeftAngle_07_ListProcessChanged();
}

QString ModbusControl::RightAngle_07_ListProcess() const
{
    return m_RightAngle_07_ListProcess;
}

void ModbusControl::setRightAngle_07_ListProcess(const QString &newRightAngle_07_ListProcess)
{
    if (m_RightAngle_07_ListProcess == newRightAngle_07_ListProcess)
        return;
    m_RightAngle_07_ListProcess = newRightAngle_07_ListProcess;
    emit RightAngle_07_ListProcessChanged();
}

QString ModbusControl::LeftAngle_08_ListProcess() const
{
    return m_LeftAngle_08_ListProcess;
}

void ModbusControl::setLeftAngle_08_ListProcess(const QString &newLeftAngle_08_ListProcess)
{
    if (m_LeftAngle_08_ListProcess == newLeftAngle_08_ListProcess)
        return;
    m_LeftAngle_08_ListProcess = newLeftAngle_08_ListProcess;
    emit LeftAngle_08_ListProcessChanged();
}

QString ModbusControl::RightAngle_08_ListProcess() const
{
    return m_RightAngle_08_ListProcess;
}

void ModbusControl::setRightAngle_08_ListProcess(const QString &newRightAngle_08_ListProcess)
{
    if (m_RightAngle_08_ListProcess == newRightAngle_08_ListProcess)
        return;
    m_RightAngle_08_ListProcess = newRightAngle_08_ListProcess;
    emit RightAngle_08_ListProcessChanged();
}

QString ModbusControl::LeftAngle_09_ListProcess() const
{
    return m_LeftAngle_09_ListProcess;
}

void ModbusControl::setLeftAngle_09_ListProcess(const QString &newLeftAngle_09_ListProcess)
{
    if (m_LeftAngle_09_ListProcess == newLeftAngle_09_ListProcess)
        return;
    m_LeftAngle_09_ListProcess = newLeftAngle_09_ListProcess;
    emit LeftAngle_09_ListProcessChanged();
}

QString ModbusControl::RightAngle_09_ListProcess() const
{
    return m_RightAngle_09_ListProcess;
}

void ModbusControl::setRightAngle_09_ListProcess(const QString &newRightAngle_09_ListProcess)
{
    if (m_RightAngle_09_ListProcess == newRightAngle_09_ListProcess)
        return;
    m_RightAngle_09_ListProcess = newRightAngle_09_ListProcess;
    emit RightAngle_09_ListProcessChanged();
}

QString ModbusControl::LeftAngle_10_ListProcess() const
{
    return m_LeftAngle_10_ListProcess;
}

void ModbusControl::setLeftAngle_10_ListProcess(const QString &newLeftAngle_10_ListProcess)
{
    if (m_LeftAngle_10_ListProcess == newLeftAngle_10_ListProcess)
        return;
    m_LeftAngle_10_ListProcess = newLeftAngle_10_ListProcess;
    emit LeftAngle_10_ListProcessChanged();
}

QString ModbusControl::RightAngle_10_ListProcess() const
{
    return m_RightAngle_10_ListProcess;
}

void ModbusControl::setRightAngle_10_ListProcess(const QString &newRightAngle_10_ListProcess)
{
    if (m_RightAngle_10_ListProcess == newRightAngle_10_ListProcess)
        return;
    m_RightAngle_10_ListProcess = newRightAngle_10_ListProcess;
    emit RightAngle_10_ListProcessChanged();
}

QString ModbusControl::LeftAngle_11_ListProcess() const
{
    return m_LeftAngle_11_ListProcess;
}

void ModbusControl::setLeftAngle_11_ListProcess(const QString &newLeftAngle_11_ListProcess)
{
    if (m_LeftAngle_11_ListProcess == newLeftAngle_11_ListProcess)
        return;
    m_LeftAngle_11_ListProcess = newLeftAngle_11_ListProcess;
    emit LeftAngle_11_ListProcessChanged();
}

QString ModbusControl::RightAngle_11_ListProcess() const
{
    return m_RightAngle_11_ListProcess;
}

void ModbusControl::setRightAngle_11_ListProcess(const QString &newRightAngle_11_ListProcess)
{
    if (m_RightAngle_11_ListProcess == newRightAngle_11_ListProcess)
        return;
    m_RightAngle_11_ListProcess = newRightAngle_11_ListProcess;
    emit RightAngle_11_ListProcessChanged();
}

QString ModbusControl::LeftAngle_12_ListProcess() const
{
    return m_LeftAngle_12_ListProcess;
}

void ModbusControl::setLeftAngle_12_ListProcess(const QString &newLeftAngle_12_ListProcess)
{
    if (m_LeftAngle_12_ListProcess == newLeftAngle_12_ListProcess)
        return;
    m_LeftAngle_12_ListProcess = newLeftAngle_12_ListProcess;
    emit LeftAngle_12_ListProcessChanged();
}

QString ModbusControl::RightAngle_12_ListProcess() const
{
    return m_RightAngle_12_ListProcess;
}

void ModbusControl::setRightAngle_12_ListProcess(const QString &newRightAngle_12_ListProcess)
{
    if (m_RightAngle_12_ListProcess == newRightAngle_12_ListProcess)
        return;
    m_RightAngle_12_ListProcess = newRightAngle_12_ListProcess;
    emit RightAngle_12_ListProcessChanged();
}

QString ModbusControl::LeftAngle_13_ListProcess() const
{
    return m_LeftAngle_13_ListProcess;
}

void ModbusControl::setLeftAngle_13_ListProcess(const QString &newLeftAngle_13_ListProcess)
{
    if (m_LeftAngle_13_ListProcess == newLeftAngle_13_ListProcess)
        return;
    m_LeftAngle_13_ListProcess = newLeftAngle_13_ListProcess;
    emit LeftAngle_13_ListProcessChanged();
}

QString ModbusControl::RightAngle_13_ListProcess() const
{
    return m_RightAngle_13_ListProcess;
}

void ModbusControl::setRightAngle_13_ListProcess(const QString &newRightAngle_13_ListProcess)
{
    if (m_RightAngle_13_ListProcess == newRightAngle_13_ListProcess)
        return;
    m_RightAngle_13_ListProcess = newRightAngle_13_ListProcess;
    emit RightAngle_13_ListProcessChanged();
}

QString ModbusControl::LeftAngle_14_ListProcess() const
{
    return m_LeftAngle_14_ListProcess;
}

void ModbusControl::setLeftAngle_14_ListProcess(const QString &newLeftAngle_14_ListProcess)
{
    if (m_LeftAngle_14_ListProcess == newLeftAngle_14_ListProcess)
        return;
    m_LeftAngle_14_ListProcess = newLeftAngle_14_ListProcess;
    emit LeftAngle_14_ListProcessChanged();
}

QString ModbusControl::RightAngle_14_ListProcess() const
{
    return m_RightAngle_14_ListProcess;
}

void ModbusControl::setRightAngle_14_ListProcess(const QString &newRightAngle_14_ListProcess)
{
    if (m_RightAngle_14_ListProcess == newRightAngle_14_ListProcess)
        return;
    m_RightAngle_14_ListProcess = newRightAngle_14_ListProcess;
    emit RightAngle_14_ListProcessChanged();
}

QString ModbusControl::LeftAngle_15_ListProcess() const
{
    return m_LeftAngle_15_ListProcess;
}

void ModbusControl::setLeftAngle_15_ListProcess(const QString &newLeftAngle_15_ListProcess)
{
    if (m_LeftAngle_15_ListProcess == newLeftAngle_15_ListProcess)
        return;
    m_LeftAngle_15_ListProcess = newLeftAngle_15_ListProcess;
    emit LeftAngle_15_ListProcessChanged();
}

QString ModbusControl::RightAngle_15_ListProcess() const
{
    return m_RightAngle_15_ListProcess;
}

void ModbusControl::setRightAngle_15_ListProcess(const QString &newRightAngle_15_ListProcess)
{
    if (m_RightAngle_15_ListProcess == newRightAngle_15_ListProcess)
        return;
    m_RightAngle_15_ListProcess = newRightAngle_15_ListProcess;
    emit RightAngle_15_ListProcessChanged();
}

QString ModbusControl::LeftAngle_16_ListProcess() const
{
    return m_LeftAngle_16_ListProcess;
}

void ModbusControl::setLeftAngle_16_ListProcess(const QString &newLeftAngle_16_ListProcess)
{
    if (m_LeftAngle_16_ListProcess == newLeftAngle_16_ListProcess)
        return;
    m_LeftAngle_16_ListProcess = newLeftAngle_16_ListProcess;
    emit LeftAngle_16_ListProcessChanged();
}

QString ModbusControl::RightAngle_16_ListProcess() const
{
    return m_RightAngle_16_ListProcess;
}

void ModbusControl::setRightAngle_16_ListProcess(const QString &newRightAngle_16_ListProcess)
{
    if (m_RightAngle_16_ListProcess == newRightAngle_16_ListProcess)
        return;
    m_RightAngle_16_ListProcess = newRightAngle_16_ListProcess;
    emit RightAngle_16_ListProcessChanged();
}

QString ModbusControl::LeftAngle_17_ListProcess() const
{
    return m_LeftAngle_17_ListProcess;
}

void ModbusControl::setLeftAngle_17_ListProcess(const QString &newLeftAngle_17_ListProcess)
{
    if (m_LeftAngle_17_ListProcess == newLeftAngle_17_ListProcess)
        return;
    m_LeftAngle_17_ListProcess = newLeftAngle_17_ListProcess;
    emit LeftAngle_17_ListProcessChanged();
}

QString ModbusControl::RightAngle_17_ListProcess() const
{
    return m_RightAngle_17_ListProcess;
}

void ModbusControl::setRightAngle_17_ListProcess(const QString &newRightAngle_17_ListProcess)
{
    if (m_RightAngle_17_ListProcess == newRightAngle_17_ListProcess)
        return;
    m_RightAngle_17_ListProcess = newRightAngle_17_ListProcess;
    emit RightAngle_17_ListProcessChanged();
}

QString ModbusControl::LeftAngle_18_ListProcess() const
{
    return m_LeftAngle_18_ListProcess;
}

void ModbusControl::setLeftAngle_18_ListProcess(const QString &newLeftAngle_18_ListProcess)
{
    if (m_LeftAngle_18_ListProcess == newLeftAngle_18_ListProcess)
        return;
    m_LeftAngle_18_ListProcess = newLeftAngle_18_ListProcess;
    emit LeftAngle_18_ListProcessChanged();
}

QString ModbusControl::RightAngle_18_ListProcess() const
{
    return m_RightAngle_18_ListProcess;
}

void ModbusControl::setRightAngle_18_ListProcess(const QString &newRightAngle_18_ListProcess)
{
    if (m_RightAngle_18_ListProcess == newRightAngle_18_ListProcess)
        return;
    m_RightAngle_18_ListProcess = newRightAngle_18_ListProcess;
    emit RightAngle_18_ListProcessChanged();
}

QString ModbusControl::LeftAngle_19_ListProcess() const
{
    return m_LeftAngle_19_ListProcess;
}

void ModbusControl::setLeftAngle_19_ListProcess(const QString &newLeftAngle_19_ListProcess)
{
    if (m_LeftAngle_19_ListProcess == newLeftAngle_19_ListProcess)
        return;
    m_LeftAngle_19_ListProcess = newLeftAngle_19_ListProcess;
    emit LeftAngle_19_ListProcessChanged();
}

QString ModbusControl::RightAngle_19_ListProcess() const
{
    return m_RightAngle_19_ListProcess;
}

void ModbusControl::setRightAngle_19_ListProcess(const QString &newRightAngle_19_ListProcess)
{
    if (m_RightAngle_19_ListProcess == newRightAngle_19_ListProcess)
        return;
    m_RightAngle_19_ListProcess = newRightAngle_19_ListProcess;
    emit RightAngle_19_ListProcessChanged();
}

QString ModbusControl::LeftAngle_20_ListProcess() const
{
    return m_LeftAngle_20_ListProcess;
}

void ModbusControl::setLeftAngle_20_ListProcess(const QString &newLeftAngle_20_ListProcess)
{
    if (m_LeftAngle_20_ListProcess == newLeftAngle_20_ListProcess)
        return;
    m_LeftAngle_20_ListProcess = newLeftAngle_20_ListProcess;
    emit LeftAngle_20_ListProcessChanged();
}

QString ModbusControl::RightAngle_20_ListProcess() const
{
    return m_RightAngle_20_ListProcess;
}

void ModbusControl::setRightAngle_20_ListProcess(const QString &newRightAngle_20_ListProcess)
{
    if (m_RightAngle_20_ListProcess == newRightAngle_20_ListProcess)
        return;
    m_RightAngle_20_ListProcess = newRightAngle_20_ListProcess;
    emit RightAngle_20_ListProcessChanged();
}

QString ModbusControl::CutCount_01_ListProcess() const
{
    return m_CutCount_01_ListProcess;
}

void ModbusControl::setCutCount_01_ListProcess(const QString &newCutCount_01_ListProcess)
{
    if (m_CutCount_01_ListProcess == newCutCount_01_ListProcess)
        return;
    m_CutCount_01_ListProcess = newCutCount_01_ListProcess;
    emit CutCount_01_ListProcessChanged();
}

QString ModbusControl::CutCount_02_ListProcess() const
{
    return m_CutCount_02_ListProcess;
}

void ModbusControl::setCutCount_02_ListProcess(const QString &newCutCount_02_ListProcess)
{
    if (m_CutCount_02_ListProcess == newCutCount_02_ListProcess)
        return;
    m_CutCount_02_ListProcess = newCutCount_02_ListProcess;
    emit CutCount_02_ListProcessChanged();
}

QString ModbusControl::CutCount_03_ListProcess() const
{
    return m_CutCount_03_ListProcess;
}

void ModbusControl::setCutCount_03_ListProcess(const QString &newCutCount_03_ListProcess)
{
    if (m_CutCount_03_ListProcess == newCutCount_03_ListProcess)
        return;
    m_CutCount_03_ListProcess = newCutCount_03_ListProcess;
    emit CutCount_03_ListProcessChanged();
}

QString ModbusControl::CutCount_04_ListProcess() const
{
    return m_CutCount_04_ListProcess;
}

void ModbusControl::setCutCount_04_ListProcess(const QString &newCutCount_04_ListProcess)
{
    if (m_CutCount_04_ListProcess == newCutCount_04_ListProcess)
        return;
    m_CutCount_04_ListProcess = newCutCount_04_ListProcess;
    emit CutCount_04_ListProcessChanged();
}

QString ModbusControl::CutCount_05_ListProcess() const
{
    return m_CutCount_05_ListProcess;
}

void ModbusControl::setCutCount_05_ListProcess(const QString &newCutCount_05_ListProcess)
{
    if (m_CutCount_05_ListProcess == newCutCount_05_ListProcess)
        return;
    m_CutCount_05_ListProcess = newCutCount_05_ListProcess;
    emit CutCount_05_ListProcessChanged();
}

QString ModbusControl::CutCount_06_ListProcess() const
{
    return m_CutCount_06_ListProcess;
}

void ModbusControl::setCutCount_06_ListProcess(const QString &newCutCount_06_ListProcess)
{
    if (m_CutCount_06_ListProcess == newCutCount_06_ListProcess)
        return;
    m_CutCount_06_ListProcess = newCutCount_06_ListProcess;
    emit CutCount_06_ListProcessChanged();
}

QString ModbusControl::CutCount_07_ListProcess() const
{
    return m_CutCount_07_ListProcess;
}

void ModbusControl::setCutCount_07_ListProcess(const QString &newCutCount_07_ListProcess)
{
    if (m_CutCount_07_ListProcess == newCutCount_07_ListProcess)
        return;
    m_CutCount_07_ListProcess = newCutCount_07_ListProcess;
    emit CutCount_07_ListProcessChanged();
}

QString ModbusControl::CutCount_08_ListProcess() const
{
    return m_CutCount_08_ListProcess;
}

void ModbusControl::setCutCount_08_ListProcess(const QString &newCutCount_08_ListProcess)
{
    if (m_CutCount_08_ListProcess == newCutCount_08_ListProcess)
        return;
    m_CutCount_08_ListProcess = newCutCount_08_ListProcess;
    emit CutCount_08_ListProcessChanged();
}

QString ModbusControl::CutCount_09_ListProcess() const
{
    return m_CutCount_09_ListProcess;
}

void ModbusControl::setCutCount_09_ListProcess(const QString &newCutCount_09_ListProcess)
{
    if (m_CutCount_09_ListProcess == newCutCount_09_ListProcess)
        return;
    m_CutCount_09_ListProcess = newCutCount_09_ListProcess;
    emit CutCount_09_ListProcessChanged();
}

QString ModbusControl::CutCount_10_ListProcess() const
{
    return m_CutCount_10_ListProcess;
}

void ModbusControl::setCutCount_10_ListProcess(const QString &newCutCount_10_ListProcess)
{
    if (m_CutCount_10_ListProcess == newCutCount_10_ListProcess)
        return;
    m_CutCount_10_ListProcess = newCutCount_10_ListProcess;
    emit CutCount_10_ListProcessChanged();
}

QString ModbusControl::CutCount_11_ListProcess() const
{
    return m_CutCount_11_ListProcess;
}

void ModbusControl::setCutCount_11_ListProcess(const QString &newCutCount_11_ListProcess)
{
    if (m_CutCount_11_ListProcess == newCutCount_11_ListProcess)
        return;
    m_CutCount_11_ListProcess = newCutCount_11_ListProcess;
    emit CutCount_11_ListProcessChanged();
}

QString ModbusControl::CutCount_12_ListProcess() const
{
    return m_CutCount_12_ListProcess;
}

void ModbusControl::setCutCount_12_ListProcess(const QString &newCutCount_12_ListProcess)
{
    if (m_CutCount_12_ListProcess == newCutCount_12_ListProcess)
        return;
    m_CutCount_12_ListProcess = newCutCount_12_ListProcess;
    emit CutCount_12_ListProcessChanged();
}

QString ModbusControl::CutCount_13_ListProcess() const
{
    return m_CutCount_13_ListProcess;
}

void ModbusControl::setCutCount_13_ListProcess(const QString &newCutCount_13_ListProcess)
{
    if (m_CutCount_13_ListProcess == newCutCount_13_ListProcess)
        return;
    m_CutCount_13_ListProcess = newCutCount_13_ListProcess;
    emit CutCount_13_ListProcessChanged();
}

QString ModbusControl::CutCount_14_ListProcess() const
{
    return m_CutCount_14_ListProcess;
}

void ModbusControl::setCutCount_14_ListProcess(const QString &newCutCount_14_ListProcess)
{
    if (m_CutCount_14_ListProcess == newCutCount_14_ListProcess)
        return;
    m_CutCount_14_ListProcess = newCutCount_14_ListProcess;
    emit CutCount_14_ListProcessChanged();
}

QString ModbusControl::CutCount_15_ListProcess() const
{
    return m_CutCount_15_ListProcess;
}

void ModbusControl::setCutCount_15_ListProcess(const QString &newCutCount_15_ListProcess)
{
    if (m_CutCount_15_ListProcess == newCutCount_15_ListProcess)
        return;
    m_CutCount_15_ListProcess = newCutCount_15_ListProcess;
    emit CutCount_15_ListProcessChanged();
}

QString ModbusControl::CutCount_16_ListProcess() const
{
    return m_CutCount_16_ListProcess;
}

void ModbusControl::setCutCount_16_ListProcess(const QString &newCutCount_16_ListProcess)
{
    if (m_CutCount_16_ListProcess == newCutCount_16_ListProcess)
        return;
    m_CutCount_16_ListProcess = newCutCount_16_ListProcess;
    emit CutCount_16_ListProcessChanged();
}

QString ModbusControl::CutCount_17_ListProcess() const
{
    return m_CutCount_17_ListProcess;
}

void ModbusControl::setCutCount_17_ListProcess(const QString &newCutCount_17_ListProcess)
{
    if (m_CutCount_17_ListProcess == newCutCount_17_ListProcess)
        return;
    m_CutCount_17_ListProcess = newCutCount_17_ListProcess;
    emit CutCount_17_ListProcessChanged();
}

QString ModbusControl::CutCount_18_ListProcess() const
{
    return m_CutCount_18_ListProcess;
}

void ModbusControl::setCutCount_18_ListProcess(const QString &newCutCount_18_ListProcess)
{
    if (m_CutCount_18_ListProcess == newCutCount_18_ListProcess)
        return;
    m_CutCount_18_ListProcess = newCutCount_18_ListProcess;
    emit CutCount_18_ListProcessChanged();
}

QString ModbusControl::CutCount_19_ListProcess() const
{
    return m_CutCount_19_ListProcess;
}

void ModbusControl::setCutCount_19_ListProcess(const QString &newCutCount_19_ListProcess)
{
    if (m_CutCount_19_ListProcess == newCutCount_19_ListProcess)
        return;
    m_CutCount_19_ListProcess = newCutCount_19_ListProcess;
    emit CutCount_19_ListProcessChanged();
}

QString ModbusControl::CutCount_20_ListProcess() const
{
    return m_CutCount_20_ListProcess;
}

void ModbusControl::setCutCount_20_ListProcess(const QString &newCutCount_20_ListProcess)
{
    if (m_CutCount_20_ListProcess == newCutCount_20_ListProcess)
        return;
    m_CutCount_20_ListProcess = newCutCount_20_ListProcess;
    emit CutCount_20_ListProcessChanged();
}

QString ModbusControl::WorkedCount_01_ListProcess() const
{
    return m_WorkedCount_01_ListProcess;
}

void ModbusControl::setWorkedCount_01_ListProcess(const QString &newWorkedCount_01_ListProcess)
{
    if (m_WorkedCount_01_ListProcess == newWorkedCount_01_ListProcess)
        return;
    m_WorkedCount_01_ListProcess = newWorkedCount_01_ListProcess;
    emit WorkedCount_01_ListProcessChanged();
}

QString ModbusControl::WorkedCount_02_ListProcess() const
{
    return m_WorkedCount_02_ListProcess;
}

void ModbusControl::setWorkedCount_02_ListProcess(const QString &newWorkedCount_02_ListProcess)
{
    if (m_WorkedCount_02_ListProcess == newWorkedCount_02_ListProcess)
        return;
    m_WorkedCount_02_ListProcess = newWorkedCount_02_ListProcess;
    emit WorkedCount_02_ListProcessChanged();
}

QString ModbusControl::WorkedCount_03_ListProcess() const
{
    return m_WorkedCount_03_ListProcess;
}

void ModbusControl::setWorkedCount_03_ListProcess(const QString &newWorkedCount_03_ListProcess)
{
    if (m_WorkedCount_03_ListProcess == newWorkedCount_03_ListProcess)
        return;
    m_WorkedCount_03_ListProcess = newWorkedCount_03_ListProcess;
    emit WorkedCount_03_ListProcessChanged();
}

QString ModbusControl::WorkedCount_04_ListProcess() const
{
    return m_WorkedCount_04_ListProcess;
}

void ModbusControl::setWorkedCount_04_ListProcess(const QString &newWorkedCount_04_ListProcess)
{
    if (m_WorkedCount_04_ListProcess == newWorkedCount_04_ListProcess)
        return;
    m_WorkedCount_04_ListProcess = newWorkedCount_04_ListProcess;
    emit WorkedCount_04_ListProcessChanged();
}

QString ModbusControl::WorkedCount_05_ListProcess() const
{
    return m_WorkedCount_05_ListProcess;
}

void ModbusControl::setWorkedCount_05_ListProcess(const QString &newWorkedCount_05_ListProcess)
{
    if (m_WorkedCount_05_ListProcess == newWorkedCount_05_ListProcess)
        return;
    m_WorkedCount_05_ListProcess = newWorkedCount_05_ListProcess;
    emit WorkedCount_05_ListProcessChanged();
}

QString ModbusControl::WorkedCount_06_ListProcess() const
{
    return m_WorkedCount_06_ListProcess;
}

void ModbusControl::setWorkedCount_06_ListProcess(const QString &newWorkedCount_06_ListProcess)
{
    if (m_WorkedCount_06_ListProcess == newWorkedCount_06_ListProcess)
        return;
    m_WorkedCount_06_ListProcess = newWorkedCount_06_ListProcess;
    emit WorkedCount_06_ListProcessChanged();
}

QString ModbusControl::WorkedCount_07_ListProcess() const
{
    return m_WorkedCount_07_ListProcess;
}

void ModbusControl::setWorkedCount_07_ListProcess(const QString &newWorkedCount_07_ListProcess)
{
    if (m_WorkedCount_07_ListProcess == newWorkedCount_07_ListProcess)
        return;
    m_WorkedCount_07_ListProcess = newWorkedCount_07_ListProcess;
    emit WorkedCount_07_ListProcessChanged();
}

QString ModbusControl::WorkedCount_08_ListProcess() const
{
    return m_WorkedCount_08_ListProcess;
}

void ModbusControl::setWorkedCount_08_ListProcess(const QString &newWorkedCount_08_ListProcess)
{
    if (m_WorkedCount_08_ListProcess == newWorkedCount_08_ListProcess)
        return;
    m_WorkedCount_08_ListProcess = newWorkedCount_08_ListProcess;
    emit WorkedCount_08_ListProcessChanged();
}

QString ModbusControl::WorkedCount_09_ListProcess() const
{
    return m_WorkedCount_09_ListProcess;
}

void ModbusControl::setWorkedCount_09_ListProcess(const QString &newWorkedCount_09_ListProcess)
{
    if (m_WorkedCount_09_ListProcess == newWorkedCount_09_ListProcess)
        return;
    m_WorkedCount_09_ListProcess = newWorkedCount_09_ListProcess;
    emit WorkedCount_09_ListProcessChanged();
}

QString ModbusControl::WorkedCount_10_ListProcess() const
{
    return m_WorkedCount_10_ListProcess;
}

void ModbusControl::setWorkedCount_10_ListProcess(const QString &newWorkedCount_10_ListProcess)
{
    if (m_WorkedCount_10_ListProcess == newWorkedCount_10_ListProcess)
        return;
    m_WorkedCount_10_ListProcess = newWorkedCount_10_ListProcess;
    emit WorkedCount_10_ListProcessChanged();
}

QString ModbusControl::WorkedCount_11_ListProcess() const
{
    return m_WorkedCount_11_ListProcess;
}

void ModbusControl::setWorkedCount_11_ListProcess(const QString &newWorkedCount_11_ListProcess)
{
    if (m_WorkedCount_11_ListProcess == newWorkedCount_11_ListProcess)
        return;
    m_WorkedCount_11_ListProcess = newWorkedCount_11_ListProcess;
    emit WorkedCount_11_ListProcessChanged();
}

QString ModbusControl::WorkedCount_12_ListProcess() const
{
    return m_WorkedCount_12_ListProcess;
}

void ModbusControl::setWorkedCount_12_ListProcess(const QString &newWorkedCount_12_ListProcess)
{
    if (m_WorkedCount_12_ListProcess == newWorkedCount_12_ListProcess)
        return;
    m_WorkedCount_12_ListProcess = newWorkedCount_12_ListProcess;
    emit WorkedCount_12_ListProcessChanged();
}

QString ModbusControl::WorkedCount_13_ListProcess() const
{
    return m_WorkedCount_13_ListProcess;
}

void ModbusControl::setWorkedCount_13_ListProcess(const QString &newWorkedCount_13_ListProcess)
{
    if (m_WorkedCount_13_ListProcess == newWorkedCount_13_ListProcess)
        return;
    m_WorkedCount_13_ListProcess = newWorkedCount_13_ListProcess;
    emit WorkedCount_13_ListProcessChanged();
}

QString ModbusControl::WorkedCount_14_ListProcess() const
{
    return m_WorkedCount_14_ListProcess;
}

void ModbusControl::setWorkedCount_14_ListProcess(const QString &newWorkedCount_14_ListProcess)
{
    if (m_WorkedCount_14_ListProcess == newWorkedCount_14_ListProcess)
        return;
    m_WorkedCount_14_ListProcess = newWorkedCount_14_ListProcess;
    emit WorkedCount_14_ListProcessChanged();
}

QString ModbusControl::WorkedCount_15_ListProcess() const
{
    return m_WorkedCount_15_ListProcess;
}

void ModbusControl::setWorkedCount_15_ListProcess(const QString &newWorkedCount_15_ListProcess)
{
    if (m_WorkedCount_15_ListProcess == newWorkedCount_15_ListProcess)
        return;
    m_WorkedCount_15_ListProcess = newWorkedCount_15_ListProcess;
    emit WorkedCount_15_ListProcessChanged();
}

QString ModbusControl::WorkedCount_16_ListProcess() const
{
    return m_WorkedCount_16_ListProcess;
}

void ModbusControl::setWorkedCount_16_ListProcess(const QString &newWorkedCount_16_ListProcess)
{
    if (m_WorkedCount_16_ListProcess == newWorkedCount_16_ListProcess)
        return;
    m_WorkedCount_16_ListProcess = newWorkedCount_16_ListProcess;
    emit WorkedCount_16_ListProcessChanged();
}

QString ModbusControl::WorkedCount_17_ListProcess() const
{
    return m_WorkedCount_17_ListProcess;
}

void ModbusControl::setWorkedCount_17_ListProcess(const QString &newWorkedCount_17_ListProcess)
{
    if (m_WorkedCount_17_ListProcess == newWorkedCount_17_ListProcess)
        return;
    m_WorkedCount_17_ListProcess = newWorkedCount_17_ListProcess;
    emit WorkedCount_17_ListProcessChanged();
}

QString ModbusControl::WorkedCount_18_ListProcess() const
{
    return m_WorkedCount_18_ListProcess;
}

void ModbusControl::setWorkedCount_18_ListProcess(const QString &newWorkedCount_18_ListProcess)
{
    if (m_WorkedCount_18_ListProcess == newWorkedCount_18_ListProcess)
        return;
    m_WorkedCount_18_ListProcess = newWorkedCount_18_ListProcess;
    emit WorkedCount_18_ListProcessChanged();
}

QString ModbusControl::WorkedCount_19_ListProcess() const
{
    return m_WorkedCount_19_ListProcess;
}

void ModbusControl::setWorkedCount_19_ListProcess(const QString &newWorkedCount_19_ListProcess)
{
    if (m_WorkedCount_19_ListProcess == newWorkedCount_19_ListProcess)
        return;
    m_WorkedCount_19_ListProcess = newWorkedCount_19_ListProcess;
    emit WorkedCount_19_ListProcessChanged();
}

QString ModbusControl::WorkedCount_20_ListProcess() const
{
    return m_WorkedCount_20_ListProcess;
}

void ModbusControl::setWorkedCount_20_ListProcess(const QString &newWorkedCount_20_ListProcess)
{
    if (m_WorkedCount_20_ListProcess == newWorkedCount_20_ListProcess)
        return;
    m_WorkedCount_20_ListProcess = newWorkedCount_20_ListProcess;
    emit WorkedCount_20_ListProcessChanged();
}

bool ModbusControl::Location_Rely_ListProcess() const
{
    return m_Location_Rely_ListProcess;
}

void ModbusControl::setLocation_Rely_ListProcess(bool newLocation_Rely_ListProcess)
{
    if (m_Location_Rely_ListProcess == newLocation_Rely_ListProcess)
        return;
    m_Location_Rely_ListProcess = newLocation_Rely_ListProcess;
    emit Location_Rely_ListProcessChanged();
}

bool ModbusControl::Warning_Jerk() const
{
    return m_Warning_Jerk;
}

void ModbusControl::setWarning_Jerk(bool newWarning_Jerk)
{
    if (m_Warning_Jerk == newWarning_Jerk)
        return;
    m_Warning_Jerk = newWarning_Jerk;
    emit Warning_JerkChanged();
}

bool ModbusControl::Warning_Servo() const
{
    return m_Warning_Servo;
}

void ModbusControl::setWarning_Servo(bool newWarning_Servo)
{
    if (m_Warning_Servo == newWarning_Servo)
        return;
    m_Warning_Servo = newWarning_Servo;
    emit Warning_ServoChanged();
}

bool ModbusControl::Warning_Front_Soft_Limit_Over() const
{
    return m_Warning_Front_Soft_Limit_Over;
}

void ModbusControl::setWarning_Front_Soft_Limit_Over(bool newWarning_Front_Soft_Limit_Over)
{
    if (m_Warning_Front_Soft_Limit_Over == newWarning_Front_Soft_Limit_Over)
        return;
    m_Warning_Front_Soft_Limit_Over = newWarning_Front_Soft_Limit_Over;
    emit Warning_Front_Soft_Limit_OverChanged();
}

bool ModbusControl::Warning_Back_Soft_Limit_Over() const
{
    return m_Warning_Back_Soft_Limit_Over;
}

void ModbusControl::setWarning_Back_Soft_Limit_Over(bool newWarning_Back_Soft_Limit_Over)
{
    if (m_Warning_Back_Soft_Limit_Over == newWarning_Back_Soft_Limit_Over)
        return;
    m_Warning_Back_Soft_Limit_Over = newWarning_Back_Soft_Limit_Over;
    emit Warning_Back_Soft_Limit_OverChanged();
}

bool ModbusControl::M_42() const
{
    return m_M_42;
}

void ModbusControl::setM_42(bool newM_42)
{
    if (m_M_42 == newM_42)
        return;
    m_M_42 = newM_42;
    emit M_42Changed();
}

bool ModbusControl::M_43() const
{
    return m_M_43;
}

void ModbusControl::setM_43(bool newM_43)
{
    if (m_M_43 == newM_43)
        return;
    m_M_43 = newM_43;
    emit M_43Changed();
}

bool ModbusControl::M_47() const
{
    return m_M_47;
}

void ModbusControl::setM_47(bool newM_47)
{
    if (m_M_47 == newM_47)
        return;
    m_M_47 = newM_47;
    emit M_47Changed();
}

bool ModbusControl::M_52() const
{
    return m_M_52;
}

void ModbusControl::setM_52(bool newM_52)
{
    if (m_M_52 == newM_52)
        return;
    m_M_52 = newM_52;
    emit M_52Changed();
}

bool ModbusControl::M_56() const
{
    return m_M_56;
}

void ModbusControl::setM_56(bool newM_56)
{
    if (m_M_56 == newM_56)
        return;
    m_M_56 = newM_56;
    emit M_56Changed();
}

bool ModbusControl::M_57() const
{
    return m_M_57;
}

void ModbusControl::setM_57(bool newM_57)
{
    if (m_M_57 == newM_57)
        return;
    m_M_57 = newM_57;
    emit M_57Changed();
}

bool ModbusControl::M_58() const
{
    return m_M_58;
}

void ModbusControl::setM_58(bool newM_58)
{
    if (m_M_58 == newM_58)
        return;
    m_M_58 = newM_58;
    emit M_58Changed();
}

bool ModbusControl::M_59() const
{
    return m_M_59;
}

void ModbusControl::setM_59(bool newM_59)
{
    if (m_M_59 == newM_59)
        return;
    m_M_59 = newM_59;
    emit M_59Changed();
}

bool ModbusControl::M_64() const
{
    return m_M_64;
}

void ModbusControl::setM_64(bool newM_64)
{
    if (m_M_64 == newM_64)
        return;
    m_M_64 = newM_64;
    emit M_64Changed();
}

bool ModbusControl::M_68() const
{
    return m_M_68;
}

void ModbusControl::setM_68(bool newM_68)
{
    if (m_M_68 == newM_68)
        return;
    m_M_68 = newM_68;
    emit M_68Changed();
}

bool ModbusControl::M_69() const
{
    return m_M_69;
}

void ModbusControl::setM_69(bool newM_69)
{
    if (m_M_69 == newM_69)
        return;
    m_M_69 = newM_69;
    emit M_69Changed();
}

bool ModbusControl::M_73() const
{
    return m_M_73;
}

void ModbusControl::setM_73(bool newM_73)
{
    if (m_M_73 == newM_73)
        return;
    m_M_73 = newM_73;
    emit M_73Changed();
}

bool ModbusControl::M_76() const
{
    return m_M_76;
}

void ModbusControl::setM_76(bool newM_76)
{
    if (m_M_76 == newM_76)
        return;
    m_M_76 = newM_76;
    emit M_76Changed();
}

bool ModbusControl::M_77() const
{
    return m_M_77;
}

void ModbusControl::setM_77(bool newM_77)
{
    if (m_M_77 == newM_77)
        return;
    m_M_77 = newM_77;
    emit M_77Changed();
}

bool ModbusControl::M_80() const
{
    return m_M_80;
}

void ModbusControl::setM_80(bool newM_80)
{
    if (m_M_80 == newM_80)
        return;
    m_M_80 = newM_80;
    emit M_80Changed();
}

bool ModbusControl::M_134() const
{
    return m_M_134;
}

void ModbusControl::setM_134(bool newM_134)
{
    if (m_M_134 == newM_134)
        return;
    m_M_134 = newM_134;
    emit M_134Changed();
}

bool ModbusControl::M_137() const
{
    return m_M_137;
}

void ModbusControl::setM_137(bool newM_137)
{
    if (m_M_137 == newM_137)
        return;
    m_M_137 = newM_137;
    emit M_137Changed();
}

bool ModbusControl::M_143() const
{
    return m_M_143;
}

void ModbusControl::setM_143(bool newM_143)
{
    if (m_M_143 == newM_143)
        return;
    m_M_143 = newM_143;
    emit M_143Changed();
}

bool ModbusControl::M_149() const
{
    return m_M_149;
}

void ModbusControl::setM_149(bool newM_149)
{
    if (m_M_149 == newM_149)
        return;
    m_M_149 = newM_149;
    emit M_149Changed();
}

bool ModbusControl::M_152() const
{
    return m_M_152;
}

void ModbusControl::setM_152(bool newM_152)
{
    if (m_M_152 == newM_152)
        return;
    m_M_152 = newM_152;
    emit M_152Changed();
}

bool ModbusControl::M_153() const
{
    return m_M_153;
}

void ModbusControl::setM_153(bool newM_153)
{
    if (m_M_153 == newM_153)
        return;
    m_M_153 = newM_153;
    emit M_153Changed();
}

bool ModbusControl::M_159() const
{
    return m_M_159;
}

void ModbusControl::setM_159(bool newM_159)
{
    if (m_M_159 == newM_159)
        return;
    m_M_159 = newM_159;
    emit M_159Changed();
}

bool ModbusControl::M_164() const
{
    return m_M_164;
}

void ModbusControl::setM_164(bool newM_164)
{
    if (m_M_164 == newM_164)
        return;
    m_M_164 = newM_164;
    emit M_164Changed();
}

bool ModbusControl::M_170() const
{
    return m_M_170;
}

void ModbusControl::setM_170(bool newM_170)
{
    if (m_M_170 == newM_170)
        return;
    m_M_170 = newM_170;
    emit M_170Changed();
}

bool ModbusControl::M_196() const
{
    return m_M_196;
}

void ModbusControl::setM_196(bool newM_196)
{
    if (m_M_196 == newM_196)
        return;
    m_M_196 = newM_196;
    emit M_196Changed();
}

bool ModbusControl::M_197() const
{
    return m_M_197;
}

void ModbusControl::setM_197(bool newM_197)
{
    if (m_M_197 == newM_197)
        return;
    m_M_197 = newM_197;
    emit M_197Changed();
}

bool ModbusControl::M_250() const
{
    return m_M_250;
}

void ModbusControl::setM_250(bool newM_250)
{
    if (m_M_250 == newM_250)
        return;
    m_M_250 = newM_250;
    emit M_250Changed();
}

bool ModbusControl::M_251() const
{
    return m_M_251;
}

void ModbusControl::setM_251(bool newM_251)
{
    if (m_M_251 == newM_251)
        return;
    m_M_251 = newM_251;
    emit M_251Changed();
}

bool ModbusControl::M_252() const
{
    return m_M_252;
}

void ModbusControl::setM_252(bool newM_252)
{
    if (m_M_252 == newM_252)
        return;
    m_M_252 = newM_252;
    emit M_252Changed();
}

QString ModbusControl::DoubleSaws_StartDelay() const
{
    return m_DoubleSaws_StartDelay;
}

void ModbusControl::setDoubleSaws_StartDelay(const QString &newDoubleSaws_StartDelay)
{
    if (m_DoubleSaws_StartDelay == newDoubleSaws_StartDelay)
        return;
    m_DoubleSaws_StartDelay = newDoubleSaws_StartDelay;
    emit DoubleSaws_StartDelayChanged();
}

bool ModbusControl::M_528() const
{
    return m_M_528;
}

void ModbusControl::setM_528(bool newM_528)
{
    if (m_M_528 == newM_528)
        return;
    m_M_528 = newM_528;
    emit M_528Changed();
}

bool ModbusControl::M_510() const
{
    return m_M_510;
}

void ModbusControl::setM_510(bool newM_510)
{
    if (m_M_510 == newM_510)
        return;
    m_M_510 = newM_510;
    emit M_510Changed();
}

bool ModbusControl::M_400() const
{
    return m_M_400;
}

void ModbusControl::setM_400(bool newM_400)
{
    if (m_M_400 == newM_400)
        return;
    m_M_400 = newM_400;
    emit M_400Changed();
}

bool ModbusControl::M_398() const
{
    return m_M_398;
}

void ModbusControl::setM_398(bool newM_398)
{
    if (m_M_398 == newM_398)
        return;
    m_M_398 = newM_398;
    emit M_398Changed();
}

bool ModbusControl::M_397() const
{
    return m_M_397;
}

void ModbusControl::setM_397(bool newM_397)
{
    if (m_M_397 == newM_397)
        return;
    m_M_397 = newM_397;
    emit M_397Changed();
}

bool ModbusControl::M_500() const
{
    return m_M_500;
}

void ModbusControl::setM_500(bool newM_500)
{
    if (m_M_500 == newM_500)
        return;
    m_M_500 = newM_500;
    emit M_500Changed();
}

bool ModbusControl::M_501() const
{
    return m_M_501;
}

void ModbusControl::setM_501(bool newM_501)
{
    if (m_M_501 == newM_501)
        return;
    m_M_501 = newM_501;
    emit M_501Changed();
}

bool ModbusControl::M_393() const
{
    return m_M_393;
}

void ModbusControl::setM_393(bool newM_393)
{
    if (m_M_393 == newM_393)
        return;
    m_M_393 = newM_393;
    emit M_393Changed();
}

bool ModbusControl::M_502() const
{
    return m_M_502;
}

void ModbusControl::setM_502(bool newM_502)
{
    if (m_M_502 == newM_502)
        return;
    m_M_502 = newM_502;
    emit M_502Changed();
}

bool ModbusControl::M_503() const
{
    return m_M_503;
}

void ModbusControl::setM_503(bool newM_503)
{
    if (m_M_503 == newM_503)
        return;
    m_M_503 = newM_503;
    emit M_503Changed();
}

bool ModbusControl::M_529() const
{
    return m_M_529;
}

void ModbusControl::setM_529(bool newM_529)
{
    if (m_M_529 == newM_529)
        return;
    m_M_529 = newM_529;
    emit M_529Changed();
}

bool ModbusControl::M_530() const
{
    return m_M_530;
}

void ModbusControl::setM_530(bool newM_530)
{
    if (m_M_530 == newM_530)
        return;
    m_M_530 = newM_530;
    emit M_530Changed();
}

bool ModbusControl::M_399() const
{
    return m_M_399;
}

void ModbusControl::setM_399(bool newM_399)
{
    if (m_M_399 == newM_399)
        return;
    m_M_399 = newM_399;
    emit M_399Changed();
}

bool ModbusControl::M_511() const
{
    return m_M_511;
}

void ModbusControl::setM_511(bool newM_511)
{
    if (m_M_511 == newM_511)
        return;
    m_M_511 = newM_511;
    emit M_511Changed();
}

bool ModbusControl::LockMechine_Flag() const
{
    return m_LockMechine_Flag;
}

void ModbusControl::setLockMechine_Flag(bool newLockMechine_Flag)
{
    if (m_LockMechine_Flag == newLockMechine_Flag)
        return;
    m_LockMechine_Flag = newLockMechine_Flag;
    emit LockMechine_FlagChanged();
}

QString ModbusControl::Wait_Worked_MaterialLength() const
{
    return m_Wait_Worked_MaterialLength;
}

void ModbusControl::setWait_Worked_MaterialLength(const QString &newWait_Worked_MaterialLength)
{
    if (m_Wait_Worked_MaterialLength == newWait_Worked_MaterialLength)
        return;
    m_Wait_Worked_MaterialLength = newWait_Worked_MaterialLength;
    emit Wait_Worked_MaterialLengthChanged();
}

QString ModbusControl::PLC_Customer_Number() const
{
    return m_PLC_Customer_Number;
}

void ModbusControl::setPLC_Customer_Number(const QString &newPLC_Customer_Number)
{
    if (m_PLC_Customer_Number == newPLC_Customer_Number)
        return;
    m_PLC_Customer_Number = newPLC_Customer_Number;
    emit PLC_Customer_NumberChanged();
}

QString ModbusControl::PLC_Order_Number() const
{
    return m_PLC_Order_Number;
}

void ModbusControl::setPLC_Order_Number(const QString &newPLC_Order_Number)
{
    if (m_PLC_Order_Number == newPLC_Order_Number)
        return;
    m_PLC_Order_Number = newPLC_Order_Number;
    emit PLC_Order_NumberChanged();
}

int ModbusControl::QR_Code_CurrentType() const
{
    return m_QR_Code_CurrentType;
}

void ModbusControl::setQR_Code_CurrentType(int newQR_Code_CurrentType)
{
    if (m_QR_Code_CurrentType == newQR_Code_CurrentType)
        return;
    m_QR_Code_CurrentType = newQR_Code_CurrentType;
    emit QR_Code_CurrentTypeChanged();
}

QString ModbusControl::Input_Passwd() const
{
    return m_Input_Passwd;
}

void ModbusControl::setInput_Passwd(const QString &newInput_Passwd)
{
    if (m_Input_Passwd == newInput_Passwd)
        return;
    m_Input_Passwd = newInput_Passwd;
    emit Input_PasswdChanged();
}

QString ModbusControl::Circle_Runing_State() const
{
    return m_Circle_Runing_State;
}

void ModbusControl::setCircle_Runing_State(const QString &newCircle_Runing_State)
{
    if (m_Circle_Runing_State == newCircle_Runing_State)
        return;
    m_Circle_Runing_State = newCircle_Runing_State;
    emit Circle_Runing_StateChanged();
}

QString ModbusControl::Circle_Mode() const
{
    return m_Circle_Mode;
}

void ModbusControl::setCircle_Mode(const QString &newCircle_Mode)
{
    if (m_Circle_Mode == newCircle_Mode)
        return;
    m_Circle_Mode = newCircle_Mode;
    emit Circle_ModeChanged();
}

QString ModbusControl::Order_Number_Circle() const
{
    return m_Order_Number_Circle;
}

void ModbusControl::setOrder_Number_Circle(const QString &newOrder_Number_Circle)
{
    if (m_Order_Number_Circle == newOrder_Number_Circle)
        return;
    m_Order_Number_Circle = newOrder_Number_Circle;
    emit Order_Number_CircleChanged();
}

bool ModbusControl::M_505() const
{
    return m_M_505;
}

void ModbusControl::setM_505(bool newM_505)
{
    if (m_M_505 == newM_505)
        return;
    m_M_505 = newM_505;
    emit M_505Changed();
}

bool ModbusControl::M_506() const
{
    return m_M_506;
}

void ModbusControl::setM_506(bool newM_506)
{
    if (m_M_506 == newM_506)
        return;
    m_M_506 = newM_506;
    emit M_506Changed();
}

bool ModbusControl::M_507() const
{
    return m_M_507;
}

void ModbusControl::setM_507(bool newM_507)
{
    if (m_M_507 == newM_507)
        return;
    m_M_507 = newM_507;
    emit M_507Changed();
}

QString ModbusControl::Tiny_Move_Distance() const
{
    return m_Tiny_Move_Distance;
}

void ModbusControl::setTiny_Move_Distance(const QString &newTiny_Move_Distance)
{
    if (m_Tiny_Move_Distance == newTiny_Move_Distance)
        return;
    m_Tiny_Move_Distance = newTiny_Move_Distance;
    emit Tiny_Move_DistanceChanged();
}

QString ModbusControl::Left_Pull_Delay() const
{
    return m_Left_Pull_Delay;
}

void ModbusControl::setLeft_Pull_Delay(const QString &newLeft_Pull_Delay)
{
    if (m_Left_Pull_Delay == newLeft_Pull_Delay)
        return;
    m_Left_Pull_Delay = newLeft_Pull_Delay;
    emit Left_Pull_DelayChanged();
}

QString ModbusControl::NetWork_CurrentPages() const
{
    return m_NetWork_CurrentPages;
}

void ModbusControl::setNetWork_CurrentPages(const QString &newNetWork_CurrentPages)
{
    if (m_NetWork_CurrentPages == newNetWork_CurrentPages)
        return;
    m_NetWork_CurrentPages = newNetWork_CurrentPages;
    emit NetWork_CurrentPagesChanged();
}

QString ModbusControl::NetWork_CountPage() const
{
    return m_NetWork_CountPage;
}

void ModbusControl::setNetWork_CountPage(const QString &newNetWork_CountPage)
{
    if (m_NetWork_CountPage == newNetWork_CountPage)
        return;
    m_NetWork_CountPage = newNetWork_CountPage;
    emit NetWork_CountPageChanged();
}

bool ModbusControl::NetWork_M61() const
{
    return m_NetWork_M61;
}

void ModbusControl::setNetWork_M61(bool newNetWork_M61)
{
    if (m_NetWork_M61 == newNetWork_M61)
        return;
    m_NetWork_M61 = newNetWork_M61;
    emit NetWork_M61Changed();
}

bool ModbusControl::NetWork_M96() const
{
    return m_NetWork_M96;
}

void ModbusControl::setNetWork_M96(bool newNetWork_M96)
{
    if (m_NetWork_M96 == newNetWork_M96)
        return;
    m_NetWork_M96 = newNetWork_M96;
    emit NetWork_M96Changed();
}

bool ModbusControl::NetWork_M97() const
{
    return m_NetWork_M97;
}

void ModbusControl::setNetWork_M97(bool newNetWork_M97)
{
    if (m_NetWork_M97 == newNetWork_M97)
        return;
    m_NetWork_M97 = newNetWork_M97;
    emit NetWork_M97Changed();
}
